irekasoft

Component

TextInput

Labeled single-line field. Any extra props (type, placeholder, value…) pass straight through to the input.

jsx
const [name, setName] = useState('');

<TextInput label="Full name" placeholder="Jane Doe"
  value={name} onChange={(e) => setName(e.target.value)} />
<TextInput label="Password" type="password" placeholder="••••••••" />

Props

Prop Type Default Description
label string Optional field label.
className string '' Extra classes on the input.
...props InputHTMLAttributes Forwarded to the underlying input (type, value, onChange, placeholder…).