@govuk-react/input-field
v0.10.7
Published
Styled composite component displaying an input with a label and hint text and error text depending on props.
Downloads
41,176
Keywords
Readme
InputField
Import
import InputField from '@govuk-react/input-field';
Use the text input component when you need to let users enter text that’s no longer than a single line, such as their name or phone number.
- https://govuk-react.github.io/govuk-react/?path=/docs/input-field
- https://design-system.service.gov.uk/components/text-input/
Properties
Prop | Required | Default | Type | Description
:--- | :------- | :------ | :--- | :----------
error
| | | boolean | Apply error state styling to the component
hint
| | undefined
| ReactNode |
input
| | {}
| InputProps |
margin
| | | Margin | Margin[] |
mb
| | | string | number |
meta
| | {}
| { error?: string | string[]; touched?: boolean; } |
padding
| | | Padding | Padding[] |