Build faster with Premium Chakra UI Components 💎

Learn more
Skip to Content
DocsPlaygroundGuidesBlog
Sponsor

Icon Button

Used to render an icon within a button

SourceStorybookRecipe

Usage

import { IconButton } from "@chakra-ui/react"
<IconButton aria-label="Search database">
  <LuSearch />
</IconButton>

Examples

Sizes

Use the size prop to change the size of the button.

xs

sm

md

lg

Variants

Use the variant prop to change its visual style

solid

subtle

surface

outline

ghost

Color

Use the colorPalette prop to change the color of the button

Rounded

Set rounded="full" to make the button fully rounded

Props

PropDefaultType
colorPalette 'gray'
'gray' | 'red' | 'orange' | 'yellow' | 'green' | 'teal' | 'blue' | 'cyan' | 'purple' | 'pink' | 'accent'

The color palette of the component

size 'md'
'xs' | 'sm' | 'md' | 'lg'

The size of the component

variant 'solid'
'solid' | 'subtle' | 'surface' | 'outline' | 'ghost' | 'plain'

The variant of the component

Previous

Icon

Next

Image