import { Story, Canvas, ArgsTable } from '@storybook/addon-docs';
import { Text } from '..';
import { Label } from './label';
# Label
The `Label` is a component used to label form inputs
## Props
The `Label` accepts all props below as well as all [Box](/docs/components-ui-box--default-story#props) component props
`Label` accepts all [Text](/docs/components-componentlibrary-text--default-story#props) component props
### Children
The `children` of the label can be text or a react node
```jsx
import { DISPLAY, AlignItems, FLEX_DIRECTION, Size, IconColor } from '../../../helpers/constants/design-system';
import { Label, TextField, Icon, ICON_NAMES } from '../../component-library';
```
### Html For
Use the `htmlFor` prop to allow the `Label` to focus on an input with the same id when clicked. The cursor will also change to a `pointer` when the `htmlFor` has a value.
```jsx
import { Label, TextField } from '../../component-library';
```
### Required
Use the `required` prop to add a required red asterisk next to the `children` of the `Label`. Note the required asterisk will always render after the `children`.
```jsx
import { Label } from '../../component-library';
;
```
```jsx
import { Label } from '../../component-library';
;
```