Skip to Content
Archi-ui 1.0.25 is released 🎉
ComponentsIconButton

IconButton

Icon buttons are commonly found in app bars and toolbars

Icons are also appropriate for toggle buttons that allow a single choice to be selected or deselected, such as adding or removing a star to an item.

Basic button

Usage

import { IconButton } from 'archi-ui' import { Heart } from 'lucide-react'
<IconButton color='error'> <Heart /> </IconButton>

Size

For larger or smaller icon buttons, use the size prop.

Rounded IconButton

For different border rdius for Icon-Buttons use rounded prop.

Color

Use color prop to apply different colors for component.

To use the IconButton component as hyperlink, just pass href prop or change the root element to <a> tag using component prop.

If href prop is passed, an <a> element will be used as the root node.

Badge

You can use the Badge component to add a badge to an IconButton.

IconButton API

API reference docs for the React IconButton component.

Props

NameTypeDefaultDescription
childrennode-The content of the component.
classNamestring-Override or extend the styles applied to the component.
size'sm' | 'md' | 'lg''md'The size of the component.
rounded'none' | 'full' | 'sm' | 'md' | 'lg''full'The border-radius of the component.
color'default' | 'primary' | 'secondary' | 'info' | 'warning' | 'success' | 'error''default'The color of the component.
disabledboolfalseIf true, the component is disabled.
hrefstring-The URL to link to when the IconButton is clicked. If defined, an <a> element will be used as the root node.
componentelementType-The component used for the root node. Either a string to use a HTML element or a component.
Last updated on