IconButton

IconButton composes the Button component. It renders only an icon.

Usage

import { IconButton } from '@binarycapsule/ui-capsules';

Knobs 🎛

academic_cap
primary
medium
solid
<IconButton
  icon="academic_cap"
/>

Props

NameDescription
icon
Required
string
Name of the icon to render.
variant
"primary" | "secondary" | "ghost" | "ghostGray" | "link"(Default: "primary")
Controls the look of the button.
as
"a" | "button"(Default: "button")
Controls which tag gets rendered (button or a).
disabled
boolean(Default: false)
If set to true, the button will be disabled.
isLoading
boolean(Default: false)
If set to true, the button will be disabled and it will display a loading indicator.
size
"small" | "medium" | "large"(Default: medium)
Changes the size of the button.
type
"button" | "submit"(Default: button)
Set this prop to "submit" when the button should submit a form.
iconVariant
"solid" | "outline"(Default: "solid")
The type of icon to render (solid or outline).