label
Label
Names a control that sits outside a Field, such as a sort select in a toolbar, and moves focus to it on click.
States: Default
Parts
| Part | File | Does |
|---|---|---|
| Label | Label.vue | Labels a form field and focuses it when the user clicks the label. |
Styling
| Part | Recipe |
|---|---|
| Label | label-root |
Install
Writes 2 files into components/ui/label/. For agents, npx @frontic/ui docs label prints this reference as markdown; the MCP server serves the same.
- npm packages
- @vueuse/core
- reka-ui
API reference
Label Label.vue
Labels a form field and focuses it when the user clicks the label. Renders a <label>.
| Prop | Type | Default | |
|---|---|---|---|
| for | string | — | |
| asChild | boolean | false | |
| as | AsTag | Component | 'label' | |
| class | ClassValue | — | |
| Recipe label-root | Sets | |
|---|---|---|
| base: label-root | 7 properties · 4 inherited | |
| disabledshared state | 1 property | |
Example