Skip to content
Forms

FloatInput

A text field whose label sits inside like a placeholder, then floats up and shrinks when you focus or type. A line grows from the middle on focus.

Download
  • React
  • Tailwind CSS v4

Props

NameTypeDefaultWhat it does
labelstring—Field name inside the box.
hintstring—Help text under the field.
errorstring—Error text. Turns the field red and sets aria-invalid.
accentstring"#a78bfa"Floated label and focus line colour.
...input propsInputHTMLAttributes—type, name, value, onChange, autoComplete… all pass to the input.
classNamestring"w-full max-w-sm"Wrapper look.