Icon Button
Import
import { IconButton } from "@sparrowengg/twigs-react";
The IconButton
component is used to render an icon within in a button.
Usage
Result
Loading...
Live EditorOpen in playground
<Flex gap="$4"> <IconButton icon={<EmailIcon />} /> <IconButton icon={<DownloadIcon />} /> </Flex>
Props
Property | Description | Type | Default | Options |
---|---|---|---|---|
icon | Icon to be rendered within the button | node | - | - |
size | Size of the icon button | string | 'sm' | 'xxs', 'xs', 'sm', 'md', 'lg', 'xl', '2xl' |
color | Color of the icon button | string | 'primary' | 'default', 'primary', 'secondary', 'bright', 'light', 'error' |
variant | Variant of the icon button | string | 'solid' | 'solid', 'ghost', 'outline' |
disabled | If true, the button will be disabled | boolean | - | - |
loading | If true, a loading indicator will be shown | boolean | - | - |
shape | Shape of the button | round | default | default | round , default |