Components
BaseInputWrapper
The label, optional marker and help that every Base input shares. Use it to give your own control the same label.
components/ui/inputs/BaseInputWrapper.vue
Internal part
This is an internal part of BaseTextField. You normally use it through BaseTextField, but it is documented so you can customise or reuse it.
Example
The default slot receives the generated id. Put it on your control and point aria-labelledby to ${id}-label, the id of the label.
API
Props
Name | Type | Default | Description |
|---|---|---|---|
group | boolean | — | Renders a fieldset with a legend for groups of controls. |
hidden-label | string | — | A label read by screen readers only, for a field without a visible label. |
label | string | — | The visible label above the field, linked to it with for and aria-labelledby. |
input-id | string | — | A fixed id for the input. One is generated with useId() when you leave it out. |
optional | boolean | — | Adds “(optional)” after the label. Never mark required fields. |
info | BaseInputInfo | — | A help popover next to the label: a text or a list of { title, text }. |
Slots
Name | Slot props | Description |
|---|---|---|
#label-suffix | — | — |
#default | { id: any; } | Your control, with the id to use. |
#label-append | — | Content at the end of the label row. |
Accessibility
Any v-if that differs between the server and the first client render shifts every later useId() and breaks these label links. Gate client-only UI with useMounted().