07 · text-inputsForms & Inputs5 Variations
Input Fields
Accessible form input controls built with React useId(), explicit label association, validation states, >=16px mobile font sizing, and distinct visual chrome.
inputsformsvalidationfloating-labelaccessible
Floating Label
text-inputs/floating-label
Loading variation text-inputs/floating-label...
Component Information
Interactive label that smoothly rests centered over empty fields and elevates on focus or non-empty input values.
- Variation ID
- text-inputs/floating-label
- Motion Engine
- css
- Source File
- src/labs/components/components/text-inputs/variations/floating-label.tsx
Reduced Motion & Accessibility
Smooth label position/scale CSS transition.
- Maintains real <label htmlFor> element rather than placeholder-only labels.
Dependencies
Zero external runtime dependencies beyond React.
Usage Documentation
import { FloatingLabelInput } from '@/src/labs/components/components/text-inputs';
export function OrgField() {
return <FloatingLabelInput label="Organization Name" />;
}Props API (4)
| Prop | Type | Default | Description |
|---|---|---|---|
| label | string | 'Organization Name' | Floating label text. |
| helperText | string | — | Supporting guidance beneath input. |
| error | string | — | Error text. |
| value | string | — | Controlled input value. |