Form
Label
A native label with the fields' typography, that checks what it points at and dims when that control is disabled.
WAI-ARIA tested
Import
main.ts
import { Label } from '@vitral/vue';Basic
Beside a checkbox, and disabled
Naming a group
API
Read from packages/vue/src/components/Label/types.ts, so it says what the component actually accepts.
Props
| Name | Type | Description |
|---|---|---|
| for | string | The `id` of the control this label names. |
| required | boolean | Shows a required mark. The control itself must still say it is required (`required`, `aria-required`). |
| disabled | boolean | Dims the label. Read from the control when it is left out. |
| size | Size | — |
Plus pt, dt and unstyled from BaseProps, see pass-through and unstyled mode.
Slots
| Name | Slot props | Description |
|---|---|---|
| default | — | — |
| required | — | Replaces the required mark. |