FormHelperText API

API reference for the FormHelperText component: its props with their token values and defaults, the styled-system prop groups, and forwarded HTML attributes.

Demos

For usage examples, visit the component demo page: FormHelperText

Import

import { FormHelperText } from '@soroush.tech/design-system/FormHelperText'

Props

children

ReactNode - the helper or error text.

error

boolean - renders in the error color and announces via role="alert". Falls back to the FormControl error value. Default: false.

id

string - overrides the helper id. Falls back to the FormControl helperId.

role

string - forwarded when not in error. In the error state, role="alert" is applied automatically.

Styled-system props

All Typography props pass through. Defaults to variant="caption" and color="secondary" (or "error" in the error state). When not in error and color is not set, it inherits textColor from FormControl/Form context (theme.text); the error state always wins.


Source code

If this page does not answer your question, have a look at the implementation of the component for more detail.