import { Story, Canvas, ArgsTable } from '@storybook/addon-docs';
import { Text } from '..';
import { HelpText } from './help-text';
# HelpText
The `HelpText` is intended to be used as the help or error text under a form element
## Props
The `HelpText` accepts all props below as well as all [Box](/docs/components-ui-box--default-story#props) component props
`HelpText` accepts all [Text](/docs/components-componentlibrary-text--default-story#props) component props
### Children
The `children` of the `HelpText` can be plain text or react nodes
```jsx
import { Size, IconColor } from '../../../helpers/constants/design-system';
import { HelpText, Icon, ICON_NAMES } from '../../component-library';
Plain text
Text and icon
```
### Error
Use the `error` prop to show the `HelpText` in error state
```jsx
import { HelpText } from '../../component-library';
This HelpText in error state;
```
### Color
It may be useful to change the color of the `HelpText`. Use the `color` prop and the `Color` object to change the color of the `HelpText`. Defaults to `Color.textDefault`.
```jsx
import { Color } from '../../../helpers/constants/design-system';
import { HelpText } from '../../component-library';
This HelpText default color is Color.textDefault
This HelpText color is Color.infoDefault
This HelpText color is Color.warningDefault
This HelpText color is Color.successDefault
;
```