Browse the docs

IconButton

A round sticker with just an icon. The label is required, so it can never ship without a name.

Client componentWCAG AASince v0.1

Live example

Change every prop live in the playground.

Props

PropTypeDefaultWhat it does
iconrequiredReactNodenoneThe icon. Decorative: it is hidden from screen readers.
labelrequiredstringnoneWhat the button does, e.g. "Start SOS call". Required: it becomes the accessible name.
burstboolean | BurstStyle | readonly string[]noneWhat flies out on click. Off by default: turn it on for the presses worth celebrating (or regretting). true picks for the variant: "confetti" for most, a "poof" of dust for tomato (cancel/delete). Or name a style: "confetti", "stars", "sparkle", "hearts" to celebrate; "poof", "zap", "drops" when something went wrong (those also shake the sticker). Or pass your own colors for confetti. Skipped under reduced motion.
loadingbooleanfalseShows a busy state, sets aria-busy and ignores clicks.
loadingLabelstring"Loading"Screen reader text while loading.
seedstring | numberReact's useId()Seeds the default tilt so it never changes between renders.
shadow"soft" | "solid" | "stripes" | "outline" | "none"PlopProvider's stickerShadow, which defaults to softThe shadow under the sticker: soft (a flat, quiet offset), solid (ink), stripes (crayon hatching), outline or none.
size"sm" | "md" | "lg"mdSticker size: sm for dense rows, lg for the one hero action.
tiltnumbera small seeded tilt; pass 0 to sit straightRotation in degrees.
variant"ink" | "tomato" | "mustard" | "mint" | "periwinkle" | "plain"inkSpot color printed under the ink.

Also takes every attribute of <button> (286 more, e.g. onClick, className, aria-*).

Use it well

DoUse it for actions everyone already recognizes: call, close, add.
Don'tHide an unusual action behind an icon. If it needs explaining, use a Button.

Accessibility

  • label becomes aria-label; leaving it out is a TypeScript error.
  • The icon is hidden from screen readers.
  • Same keyboard, focus and press behavior as Button.
Five stamps!

All aboard.

You took the whole tour. Here's Holo Pip, a foil sticker for riders who finish. It's in your playground tray now, for good.