Andeus Designfor Reactv0.1
Components · Forms

Input

Single-line text field with a label above and an optional hint or error below.

jsx
import { Input } from '@andeus/ui';

Field

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

<Input label="Name" placeholder="Trend follower" value={name} onChange={(e) => setName(e.target.value)} />
<Input label="Search" icon="search" placeholder="Ticker" />
<Input label="Allocation" numeric suffix="%" hint="Of the portfolio" />
<Input label="Ticker" error="No such ticker" />

Props

PropTypeDefault
valuestring | number—Controlled with onChange; or pass defaultValue / defaultChecked.
labelstring | ReactNode—
hintstring | ReactNode—
errorstring | ReactNode—Replaces the hint and marks the field invalid.
iconIconName—Leading icon.
suffixstring | ReactNode—Unit after the value.
size's' | 'm' | 'l''m'
numericbooleanfalseRight-aligned tabular numerals.
placeholderstring—
disabledbooleanfalse
PreviousIconButtonNextSelect