import { Story, Canvas, ArgsTable } from '@storybook/addon-docs';
import { ButtonIcon } from './button-icon';
# ButtonIcon
The `ButtonIcon` is used for icons associated with a user action.
## Props
### Icon Name\*
Use the required `iconName` prop with `IconName` enum from `./ui/components/component-library` to select icon.
Use the [IconSearch](/story/components-componentlibrary-icon--default-story) story to find the icon you want to use.
```jsx
import { ButtonIcon, IconName } from '../../component-library';
;
```
### Size
Use the `size` prop and the `ButtonIconSize` enum from `./ui/components/component-library/icon` to change the size of `ButtonIcon`. Defaults to `ButtonIconSize.Sm`
Possible sizes include:
- `ButtonIconSize.Sm` 24px
- `ButtonIconSize.Lg` 32px
```jsx
import { ButtonIcon, ButtonIconSize, IconName } from '../../component-library';
```
### Aria Label
Use the `ariaLabel` prop to set the name of the ButtonIcon for proper accessibility
```jsx
import { IconColor } from '../../../helpers/constants/design-system';
import { ButtonIcon, IconName } from '../../component-library';
```
### As
Use the `as` box prop to change the element of `ButtonIcon`. Defaults to `button`.
Button `as` options:
- `button`
- `a`
```jsx
import { IconColor } from '../../../helpers/constants/design-system';
import { ButtonIcon, IconName } from '../../component-library';
```
### Href
When an `href` prop is passed it will change the element to an anchor(`a`) tag.
```jsx
import { IconColor } from '../../../helpers/constants/design-system';
import { ButtonIcon, IconName } from '../../component-library';
;
```
### Color
Use the `color` prop and the `Color` object to change the color of the `ButtonIcon`. Defaults to `Color.iconDefault`.
```jsx
import { IconColor } from '../../../helpers/constants/design-system';
import { ButtonIcon, IconName } from '../../component-library';
;
```
### Disabled
Use the boolean `disabled` prop to disable button
```jsx
import { ButtonIcon, IconName } from '../../component-library';
;
```