IconButton
A specialized button component designed to display icons with various sizes, colors, variants, and states.
Import
import { IconButton } from "@sparrowengg/twigs-react";Usage
const IconButtonExample = () => {
return (
<IconButton
icon={<AttachmentIcon />}
aria-label="Edit"
size="md"
color="primary"
variant="solid"
/>
);
};Props
IconButton
| Prop | Type | Default |
|---|---|---|
icon? | ReactElement | - |
aria-label? | string | - |
size? | 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'sm' |
color? | 'default' | 'primary' | 'secondary' | 'bright' | 'light' | 'error' | 'primary' |
variant? | 'solid' | 'ghost' | 'outline' | 'solid' |
shape? | 'round' | 'default' | 'default' |
disabled? | boolean | false |
loading? | boolean | false |
css? | object | - |