Helper text

Helper text is an on-screen field guideline that helps provide context regarding field inputs.

Examples

Basic

This is default helper text
This is indeterminate helper text: indeterminate status;
This is warning helper text: warning status;
This is success helper text: success status;
This is error helper text: error status;

With custom icons

This is default helper text
This is indeterminate helper text : indeterminate status;
This is warning helper text : warning status;
This is success helper text : success status;
This is error helper text : error status;

Multiple items

You can pass multiple <HelperTextItem> components inside a single <Helpertext> container.

  • This is default helper text
  • This is another default helper text in the same HelperText block
  • And this is more default text in the same HelperText block

Props

HelperText

*required
NameTypeDefaultDescription
aria-labelstringAdds an accessible label to the helper text when component is a "ul".
childrenReact.ReactNodeContent rendered inside the helper text container.
classNamestringAdditional classes applied to the helper text container.
component'div' | 'ul''div'Component type of the helper text container
idstringID for the helper text container. The value of this prop can be passed into a form component's aria-describedby prop when you intend for all helper text items to be announced to assistive technologies.
isLiveRegionbooleanfalseFlag for indicating whether the helper text container is a live region. Use this prop when you expect or intend for any helper text items within the container to be dynamically updated.

HelperTextItem

*required
NameTypeDefaultDescription
childrenReact.ReactNodeContent rendered inside the helper text item.
classNamestringAdditional classes applied to the helper text item.
component'div' | 'li''div'Sets the component type of the helper text item.
iconReact.ReactNodeCustom icon prefixing the helper text. This property will override the default icon when the variant property is passed in.
idstringID for the helper text item. The value of this prop can be passed into a form component's aria-describedby prop when you intend for only specific helper text items to be announced to assistive technologies.
screenReaderTextstring`${variant} status`Text that is only accessible to screen readers in order to announce the variant of a helper text item. This prop can only be used when the variant prop has a value other than "default".
variant'default' | 'indeterminate' | 'warning' | 'success' | 'error''default'Variant styling of the helper text item. Will also render a default icon, which can be overridden with the icon prop.

CSS variables

Expand or collapse columnSelectorVariableValue

View source on GitHub