Label
Label is a standalone form label element. Use it when you need a label outside of FormGroup, or when building custom form layouts.
Basic usage
vue
<Label for="name">Full name</Label>
<Input id="name" v-model="name" />Required indicator
vue
<Label for="email" required>Email address</Label>
<Input id="email" v-model="email" type="email" />The required prop appends a red * to the label text.
When to use Label vs FormGroup
- Use
FormGroupwhen you want the full field wrapper: label + field + error/hint in one block. This is the standard for most forms. - Use
Labelwhen you need a label independently — e.g. in a custom grid layout where the error handling is managed elsewhere.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
for | string | — | for attribute linking the label to an input id |
required | boolean | false | Appends a red * to the label |
Slots
| Slot | Description |
|---|---|
| default | Label text |