Ravox KitForms

Input

A text field with label, hint and error already wired to the input, an icon or prefix at the start and an action at the end (generate, copy, show password). Accepts React Hook Form's register() directly.

Letras, números e ponto. Dá para trocar depois.

Settings

Estado
Tamanho
No fim
Toggles

Installation

The command creates components/ui/input.tsx in your project and installs the theme with it. The file is yours: edit it as you like.

npx @ravox-ui/cli add input

Props

PropTypeDefaultDescription
labelReactNode—Text of the <label>. Without a label, pass aria-label.
hintReactNode—Help below the field, read together with it (aria-describedby). Hidden when there is an error.
errorReactNode—Error message: paints the border, sets aria-invalid and is read together with the field.
iconReactNode—Icon or prefix at the start, inside the border (<Search />, "$", "https://").
actionReactNode—Action at the end, inside the border. Use <InputAction>.
passwordTogglebooleanfalseWith type="password": button to show and hide the password.
size"sm" | "md" | "lg""md"Height: 32, 40 or 48px. The medium one uses 16px on mobile (no iPhone zoom).
wrapperClassNamestring—Classes of the outer block; className goes on the <input>.
...propsComponentProps<"input">—Everything an <input> accepts, including ref (React 19): {...register("email")} works.

More in Forms