Input
Notched Label Input
NewA field whose label moves into a gap in its outline, with a character counter ring that fills up to the limit.
npx motionsnack add notched-label-inputCustomize
Warning Colour
Error Colour
Success Colour
<NotchedLabelInput />Props
30 properties
| Property | Type | Default | Description |
|---|---|---|---|
| value | string | - | Controlled value. Leave undefined to let the component manage it. |
| defaultValue | string | '' | Value on first render when uncontrolled. |
| onChange | (value: string) => void | - | Called with the new text on every change. |
| name | string | - | Name submitted with a form. |
| autoComplete | string | from type | Native autocomplete hint. |
| clearLabel | string | 'Clear text' | Accessible name of the clear button. |
| invalid | boolean | false | Invalid without its own message. |
| charactersOverLabel | string | '{n} characters too many.' | Error text past the limit. |
| warnColor | string | - | Deprecated alias of warningColor. |
| id | string | generated | Id of the input. |
| className | string | '' | Extra classes on the wrapper. |
| label | string | 'Project name' | Label that moves into a gap in the outline on focus or when filled. |
| placeholder | string | 'e.g. Spring launch' | Hint inside the field, visible once the label has moved up. |
| maxLength | number | 40 | Character limit for the counter. Typing past it is allowed and shows an error. 0 = no limit. |
| showCounter | boolean | true | Show the character counter with a ring that fills up. |
| helperText | string | 'Shown on the invoice and in your dashboard.' | Small text under the field. Empty hides it. |
| error | string | '' | Error message. Any text turns the outline red and replaces the helper text. |
| type | 'text' | 'email' | 'tel' | 'url' | 'text' | Native input type. |
| required | boolean | false | Marks the field as required. |
| disabled | boolean | false | Disables the field. |
| readOnly | boolean | false | Focusable and selectable, but not editable. |
| clearable | boolean | false | Clear button while the field has a value. |
| warning | string | '' | Warning message in the helper slot. Does not block submit. |
| success | boolean | false | Check at the end after an async check passed. |
| warningColor | string | '' | Counter near the limit and warning message, both themes. Empty uses the per-theme pair. |
| errorColor | string | '' | Error colour for both themes. Empty uses the per-theme pair. |
| successColor | string | '' | Success colour for both themes. Empty uses the per-theme pair. |
| height | number | 48 | Height of the field. |
| radius | number | 12 | Corner radius of the field. |
| duration | number | 0.3 | Seconds the label takes to move. |
About Notched Label Input
Notched Label Input keeps its label inside the field until it is focused or filled, then moves it up into a gap that opens in the outline. On the right a small ring fills as the text grows and the counter turns amber close to the limit and red at it. Focus shows the library's clear outline, white on dark pages and black on light ones. Helper text, a required mark and an error state are built in, and the counter is read out to screen readers.
What's included
- Label that moves into a gap in the outline
- Character counter with a filling ring
- Warning and limit colours
- Clear focus outline, white on dark and black on light
- Helper text, required and error states
- Light and dark look
- Type
- Animated React input component
- Library
- Components · Input
- Stack
- Next.js, React, Tailwind CSS
- Added
- 2026-11-23
- Install
npx motionsnack add notched-label-input