Label is a light wrapper around the basic HTML label element
It adds default styling and the
Labels are associated with controls like
checkbox, however before using this component consider using one of the provided
Field components that are available. Use this
Label to compose more complex
Field type components.
For accessibility purposes the component needs either to have the
htmlFor prop set to link it to the control it is associated with or to wrap around the component that it is labelling.
<Label size="sm">A small label</Label>
<Label>A normal label</Label>
To denote a required field, the
required prop will add an
* suffix to the label text.
<Label required>A normal label</Label>