Icon Button
A icon button renders an icon within a button.
Usage
- Import the
IconButtonand your preferred icons from “figBlocks”. - The
iconSvg&iconTextprops can be used to specify the icons. - Refer Icon component for further details.
<script> import { IconButton } from 'figblocks'; import { IconStyles } from 'figblocks/icons'; </script> <IconButton iconSvg={IconStyles} /> <IconButton iconSvg={IconStyles} active />
Active state
Pass the active prop to set the button state to active.
<IconButton iconSvg={IconStyles} active /> Disabled state
Pass the disabled prop to disable the button.
<IconButton disabled iconSvg={IconStyles} /> Props
active | boolean | false | If true, sets the button state to active. |
disabled | boolean | false | If true, the button will be disabled. |
iconSvg | string | undefined | Refer Icon component. |
iconText | string | undefined | Refer Icon component. |
class | string | undefined | Custom CSS classname for styling |
Events
on:clickon:focuson:bluron:mouseoveron:mouseenteron:mouseleave