Input

A single-line text control with theme-aware focus, invalid, and disabled states.

Preview#

Controls
import { Input } from "raft-ui";

<Input />

Types#

States#

disabled wins over data-invalid. A disabled invalid input keeps the disabled border and removes the invalid ring because the user cannot edit it.

With Field#

Label and message come from Field. Input stays a pure control; set invalid on the field when the message belongs to the same validation state.

Password managers#

Use suppressPasswordManager only for non-credential fields where extension overlays would cover custom UI. Credential fields should keep native browser and password-manager help.

API#WIP

PropTypeDefaultDescription
data-invalidbooleanStandalone invalid styling; the control mirrors it to aria-invalid. Inside Field, prefer Field invalid; Base UI passes invalid state to the control.
onValueChange(value, eventDetails) => voidBase UI change callback for controlled composition.
suppressPasswordManagerbooleanfalseAdds common password-manager ignore hints for non-credential fields where extension overlays would obscure custom UI.
refRef<HTMLInputElement>Forwarded to the underlying input (React 19 ref prop).
renderReactElement | (props, state) => ReactElementReplace the rendered element or compose with another component (Base UI).
...propsBase UI Input.PropsAll native input attributes (value, onChange, type, placeholder, etc.).