Code

API

This component extends the native label tag props. This means this component can receive the native html label tag attributes, for example, the htmlFor attribute (which is why it's not included in the table). See for reference: label tag props.

Props
Type
Required

children

string

className

string

info

string

isRequired

boolean

children

This children prop can receive a string as children. The element passed here will be rendered.

info

A string that renders a tooltip that when hovered renders the passed string.

infoIcon

This is an icon that is rendered next to the label, that acts as a tooltip and when hovered displays the info message.

isRequired

Adds an * as a required indicator.

Example

Live Code

Last updated