Field
We recommend using Final Form, Redux Form or Formik with these components. If so, use ConnectedField
for your fields (as in the examples below). The examples below give you an overview of common props (e.g. size
, disable
, required
etc.)
You can find props for each field component in the other Fields
pages.
Install and import
Sizes
Variants
Disabled
Required
Refs
You can create a ref
* and pass it to a component to access the underlying DOM element.
Note: ref
s can be created with either React.createRef()
or React.useRef(null)
for functional components or a callback ref if using a React class
.
Properties
Name | Type(s) | Default | Required |
---|---|---|---|
children | node | ||
component | union | ||
type | string |
Dependencies
- - @welcome-ui/field-group^3.0.0-alpha.2
- - @welcome-ui/hint^3.0.0-alpha.2
- - @welcome-ui/label^3.0.0-alpha.2
- - @welcome-ui/system^3.0.0-alpha.2
- - polished^3.4.1
Peer dependencies
- - @xstyled/styled-components^2.1.0
- - @xstyled/system^2.1.0
- - react^16.10.2 || ^17.0.1
- - react-dom^16.10.2 || ^17.0.1
- - styled-components^5.0.0