Components / Forms & controlsv1.0.0 · updated 2026-09-12
Free · MIT
Label floats on focus or value, a hot bar draws under the field on focus, and an error shakes the field once it has been touched.
inputformvalidation
We only send receipts
Customize
Accent
Install
No dependencies beyond React. Copy the file and import it.
- Copy
Field.tsxfrom the Code tab intocomponents/brazen/. - Make sure the Brazen tokens are loaded (
tokens.css); colours and timing come from them. - Import it and pass the props below.
Props 4
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | — | Field label. |
hint | string | — | Helper text. |
error | string | — | Error text; shown after blur. |
as | "input" | "textarea" | "input" | Element. |
Features
- Floating label
- Input or textarea
- Error after first blur
Dependencies
react@>=19peer
Works with
- React 19
- Next.js 15+
- TypeScript
Reduced motion
No shake; label still moves.