Form
FloatLabel
A real label that starts inside the field and lifts out on focus or once there is a value; IftaLabel keeps it inside, above the value.
WAI-ARIA tested
Import
main.ts
import { FloatLabel } from '@vitral/vue';Variants
over (the default), in and on.
With a select
A select has no placeholder state to read, so `filled` tells the wrapper.
IftaLabel
API
Read from packages/vue/src/components/FloatLabel/types.ts, so it says what the component actually accepts.
Props
| Name | Type | Description |
|---|---|---|
| variant | 'over' | 'in' | 'on' | - `over` (the default): the label lifts onto the field's border. - `in`: it stays inside, above the value. - `on`: it parks on the border without the field growing. |
| invalid | boolean | — |
| filled | boolean | Lift the label although the control has no placeholder to read. Native fields are detected from `:placeholder-shown`; a select or a date picker has no such state, so its wrapper is told. |
Plus pt, dt and unstyled from BaseProps, see pass-through and unstyled mode.
Slots
| Name | Slot props | Description |
|---|---|---|
| default | — | The control and its `<label>`, in that order. |