Skip to Content

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

🔍
<TextInput placeholder="Search…" prefix={<SearchIcon />} /> <TextInput placeholder="0.00" suffix="Kč" />

For a label + hint + error wrapper, combine with FormField.

Props

PropTypeDefaultDescription
childrenReactNodecontent rendered inside the component
stepstring | number1amount added/removed per step or arrow key (default 1)
maxstring | number
minstring | number
size"sm" | "md" | "lg"md
status"warning" | "error"validation state styling
prefixReactNodecontent rendered inside the input, before the text (e.g. an icon)
suffixReactNodecontent rendered inside the input, after the text (e.g. a unit or button)

* required · generated from packages/ui/src/input/TextInput/TextInput.tsx