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 Forms pages.

Install and import #

Sizes #

Variants #

A hint

Disabled #

Required #

Refs #

You can create a ref* and pass it to a component to access the underlying DOM element.

Note: refs can be created with either React.createRef() or React.useRef(null) for functional components or a callback ref if using a React class.


Click a button below to focus the relevant field above
Click the button below to read the button's ref in the console
Test button
Click the link below to read the link's ref in the console
Test link

Properties #

NameType(s)DefaultRequired
children
node
component
union
type
string

Dependencies #

Peer dependencies #