Icon button

A square icon-only button with a tooltip. Hover is instant on pointer devices, the press scales to 0.97, and an open menu keeps it on state/selected.

In a toolbar

Archive, delete, star, previous and next from the email toolbar. Hover one, then move along: the first tooltip waits 450ms, the next ones open instantly.

Sizes and tones

xs (20) for the sidebar’s back, forward and refresh, sm (28) for toolbars and pagination, md (32, round) with tone="inverse" on the selection bar.

Usage

import { IconButton } from "@kuori/ui/icon-button";
<IconButton icon="archive" label="Archive" shortcut="E" onClick={archive} />

IconButton

PropTypeDescription
iconRequired
IconName
A Kuori icon name
labelRequired
string
What it does. The accessible name and the tooltip
shortcut
string
Shown dimmed after the label in the tooltip
size
'xs''sm''md'
xs is 20, sm is 28, md is 32 and roundDefault: sm
tone
'default''inverse'
inverse is for buttons on bg/inverse, like the selection barDefault: default
iconSize
12141620
16 by default, 14 at xs and for the previous and next arrows
iconWeight
'regular''fill'
Fill for on states, like a starred emailDefault: regular
active
boolean
Shows it as on (state/selected), like the … trigger while its menu is open
tooltip
boolean
Set false when the label is already visible nearbyDefault: true
tooltipSide
'top''bottom''left''right'
Where the tooltip opensDefault: top
...props
ButtonHTMLAttributes
Anything else, like onClick or disabled, goes to the button