Input
A single-line text field with size variants and native validation styling.
- Forms
- 2 files
- 1 npm package
- Accessibility notes
Loading the example…
pnpm dlx @dowel-ui/cli add inputnpm packages installed: class-variance-authority.
import { Input } from "@/components/ui/input";Default
Sizes
Invalid
Disabled
Types
Floating Label
Floating Label States
<Input>
| Prop | Type | Default |
|---|---|---|
inputSize | "sm" | "md" | "lg" | "md" |
Plus every attribute of <input>.
Always pair with a Label via htmlFor/id. Error state is driven by aria-invalid so assistive technology and styling stay in sync; describe the error with aria-describedby. FloatingLabelInput keeps a real <label for> as the accessible name whether resting or floated, and floats it with CSS alone.
8/8
checks passed
- Tested — passes
- axe assertion — passes
- Keyboard tested — does not apply
- Storybook examples — passes
- Accessibility documented — passes
- Semantic tokens only — passes
- Motion from tokens — passes
- className merged — passes
- Visible focus — does not apply
- No fixed widths — passes