TextInput
Single-line text input. Besides the props below it accepts all native <input>
attributes (value, onChange, placeholder, type, maxLength, …).
import { TextInput } from '@gg-software/ui';
<TextInput placeholder="Default" />
<TextInput placeholder="Small" size="sm" />
<TextInput placeholder="Error state" status="error" />
<TextInput placeholder="Disabled" disabled />Prefix & suffix
🔍Kč
<TextInput placeholder="Search…" prefix={<SearchIcon />} />
<TextInput placeholder="0.00" suffix="Kč" />For a label + hint + error wrapper, combine with FormField.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | — | content rendered inside the component |
step | string | number | 1 | amount added/removed per step or arrow key (default 1) |
max | string | number | — | |
min | string | number | — | |
size | "sm" | "md" | "lg" | md | |
status | "warning" | "error" | — | validation state styling |
prefix | ReactNode | — | content rendered inside the input, before the text (e.g. an icon) |
suffix | ReactNode | — | content rendered inside the input, after the text (e.g. a unit or button) |
* required · generated from packages/ui/src/input/TextInput/TextInput.tsx