FormControl | NativeBase | Universal Components for React and React Native

Search
K
Hire us
If you are starting a new project, please try gluestack-ui for better performance and new design.
FormControl
FormControl provides context such as isInvalid, isDisabled, and isRequired to form elements.
Examples
Basic
Playground
Custom Style
Playground
Props
FormControl
nativeID
If provided, this prop is passed to its children.
Type: string
isInvalid
If true, this prop is passed to its children.
Type: boolean
isRequired
If true, this prop is passed to its children.
Type: boolean
isDisabled
If true, this prop is passed to its children.
Type: boolean
isReadOnly
If true, this prop is passed to its children.
Type: boolean
FormControl.Label
_disabled
Passed props will be applied on disabled state.
Type:
_invalid
Passed props will be applied on invalid state.
Type:
htmlFor
Reflects the value of the 'for' content property.
Type: string
FormControl.ErrorMessage
_disabled
Passed props will be applied on disabled state.
Type:
FormControl.HelperText
_disabled
Passed props will be applied on disabled state.
Type:
_invalid
Passed props will be applied on invalid state.
Type:
Styling
NativeBase ships with a default theme for each component. Check out the default theme of the formControl.
Info: We can easily extend the formControl component theme using extendTheme function as described in the documentation .
Nativebase logo
MadeWithNativeBase