|Content/text for the label.|
|HTML tag to render the label as.|
|Additional CSS classes.|
|Use to associate with a form-element's id.|
|Id for the label.|
|Visually hides the label.|
|Ref for the wrapping element.|
Labels identify Form elements on a page. In addition to basic information display, Labels are critical for accessibility reasons: users who use screen readers rely on labels to identify an element that has no defining attributes of its own. Labels go a long way to ensure that your application is accessible for all users.
For more information on how to use the features and props for this component, check out the developer documentation.
Labels must be provided for every Form input regardless of whether they are visible or not. Labels should be visible whenever possible to help users with cognitive challenges or users of speech-to-input software easily identify and navigate the application. If for any reason you need to visually hide a Label, you should use the labelHidden prop. This will ensure the Label is still read by screen readers.
You can override the styles of the Label component by setting a custom theme on the Configuration component.
// → base.palette.foreground-color
// → base.font-weight.semi-bold