Skip to content

TextInput

Used to get user input in a text field.

Please enter your name
// Import component
import { TextInput } from '@fintech-sandpit/ui/react';
// Import styles (optional)
import '@fintech-sandpit/ui/style/components/field.css';
return (
<TextInput
label="Name"
placeholder="John Doe"
hint="Please enter your name"
error="Invalid name"
/>
);
NameTypeRequiredDefaultDescription
valuestring—Controlled value of the text input
defaultValuestring—Default (uncontrolled) value of the text input
namestring—Name of the input element
orientationOrientationverticalOrientation of the text input
sizeSizemdSize of the text input
labelstring—Label of the text input
hintstring—Helper text of the text input
errorstring—Error text of the text input
clearablebooleanfalseWhether the text input is clearable
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
placeholderstring—Placeholder of the text input
NameTypeDescription
onValueChange(value: string) => voidEvent handler for when the value changes
onValueClear() => voidEvent handler for when the value is cleared
type Orientation = 'horizontal' | 'vertical';
type Size = 'xs' | 'sm' | 'md' | 'lg' | 'xl';