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
iconRequiredIconNameA Kuori icon name
labelRequiredstringWhat it does. The accessible name and the tooltip
shortcutstringShown dimmed after the label in the tooltip
size'xs''sm''md'xs is 20, sm is 28, md is 32 and roundDefault:
smtone'default''inverse'inverse is for buttons on bg/inverse, like the selection barDefault:
defaulticonSize1214162016 by default, 14 at xs and for the previous and next arrows
iconWeight'regular''fill'Fill for on states, like a starred emailDefault:
regularactivebooleanShows it as on (state/selected), like the … trigger while its menu is open
tooltipbooleanSet false when the label is already visible nearbyDefault:
truetooltipSide'top''bottom''left''right'Where the tooltip opensDefault:
top...propsButtonHTMLAttributesAnything else, like onClick or disabled, goes to the button