Extensions

Press shift + S to search API reference.

React component

Props

interface LabelProps extends AllStylesProps, AriaProps
childrenReact.ReactNode | string

The contents of the label.

classNameundefined | string

Additional class names to apply, separated by spaces.

dataAttributesDataAttributesProp

Data attributes that are spread onto the element, e.g. dataAttributes={{'data-*': '...'}}.

htmlForundefined | string

The for attribute. Should contain the id of the input.

idundefined | string

The id attribute.

roleundefined | string

The role attribute.

sizeTextSizeProp

The size of the label. Defaults to default. Can be a responsive prop object.

styleReact.CSSProperties

Additional styles.