Skip to content

TextInput

Used to get user input in a text field.

Please enter your name
import { TextInput } from '@fintech-sandpit/ui/react';
return (
<TextInput
label="Name"
placeholder="John Doe"
hint="Please enter your name"
error="Invalid name"
/>
);
NameTypeRequiredDefaultDescription
valuestringControlled value of the text input
defaultValuestringDefault (uncontrolled) value of the text input
namestringName of the input element
orientationOrientationverticalOrientation of the text input
sizeSizemdSize of the text input
labelstringLabel of the text input
hintstringHelper text of the text input
errorstringError text of the text input
requiredbooleanfalseWhether the text input is required
invalidbooleanfalseWhether the text input is invalid
readOnlybooleanfalseWhether the text input is read only
disabledbooleanfalseWhether the text input is disabled
placeholderstringPlaceholder of the text input
NameTypeDescription
onChange(value: string) => voidEvent handler for when the value changes
type Orientation = 'horizontal' | 'vertical';
type Size = 'xs' | 'sm' | 'md' | 'lg' | 'xl';