Input

A versatile input field with animated feedback, prefixes, labels, and error handling.

Usage

import { Input } from '@smartacteam/react-native-ui';
<Input
  placeholder="Enter your username"
  label="Username"
  value={...}
  onChangeText={...}
/>

Example

Preview

Props

NameTypeRequiredDescription
labelstringNoLabel displayed above the input.
descriptionstringNoHelper or error description displayed below the input.
errorbooleanNoDisplays error styling if true.
formNamestringNoA name for input used in Form.
disabledbooleanNoDisables the input and changes its style accordingly.
leftComponentReact.ReactNodeNoCustom element rendered to the left of the input container.
rightComponentReact.ReactNodeNoCustom element rendered to the right of the input container.
startPrefixReact.ReactNodeNoElement rendered inside the input at the start (left side).
endPrefixReact.ReactNodeNoElement rendered inside the input at the end (right side).
type'default' | 'chat'NoModifies styling of the input. chat style has more rounded borders.
container_*BaseSmacStylingNoPrefixed props that apply styles to the outer container (e.g. container_mt_4).
(Inherited)TextInputProps & BaseSmacStylingNoAll standard React Native TextInput props and base SMAC styling.

Error state triggers border and description color animations.

Style props prefixed with container_ apply to the root wrapper <View> around the entire input component.

See BaseSmacStyling and TextInputProps for inherited options.