Skip to main content

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...
<Flex gap="$4">
  <IconButton icon={<EmailIcon />} />
  <IconButton icon={<DownloadIcon />} />
</Flex>

Props

PropertyDescriptionTypeDefaultOptions
iconIcon to be rendered within the buttonnode--
sizeSize of the icon buttonstring'sm''xxs', 'xs', 'sm', 'md', 'lg', 'xl', '2xl'
colorColor of the icon buttonstring'primary''default', 'primary', 'secondary', 'bright', 'light', 'error'
variantVariant of the icon buttonstring'solid''solid', 'ghost', 'outline'
disabledIf true, the button will be disabledboolean--
loadingIf true, a loading indicator will be shownboolean--