Orbit
Input
Source
A single-line text field with optional leading and trailing slots for icons or adornments.
Basic
A controlled text field driven by React state.
const [value, setValue] = useState('')
<Input
placeholder="Enter your name"
value={value}
onChange={(e) => setValue(e.target.value)}
/>Slots
preSlot renders a leading adornment and postSlot a trailing one. Slots are pointer-transparent so clicks fall through to the field.
<Input preSlot={<Search className="h-4 w-4" />} placeholder="Search" />
<Input postSlot={<Mail className="h-4 w-4" />} placeholder="you@example.com" />Disabled
A disabled field cannot be focused or edited.
<Input placeholder="Disabled" value="Read only value" disabled />
Props
value
stringControlled input value.
onChange
(e: ChangeEvent<HTMLInputElemen…Called on every keystroke.
placeholder
stringPlaceholder shown when the input is empty.
type
'text' | 'email' | 'password' |…default: 'text'Native input type.
preSlot
ReactNodeContent rendered inside the field on the left, typically an icon. Adds left padding automatically.
postSlot
ReactNodeContent rendered inside the field on the right. Adds right padding automatically.
disabled
booleandefault: falsePrevents interaction and dims the field.
className
stringMerged onto the input element via tailwind-merge.