Browse the docs
Actions / Button

Button

The hero sticker. Peels on hover, squishes on press, springs back with an ink burst. Add a buddy for the one action that matters most on a screen.

Client componentWCAG AASince v0.1

Change every prop live in the playground.

Props

Button

PropTypeDefaultWhat it does
children requiredReactNode—Short label; lettered in Sketchpop Bold Italic, uppercase.
buddyboolean | "peek"noneA little character peeking over the top. Use it on the one action that matters most on a screen. `"peek"` keeps it hidden behind the sticker until hover or keyboard focus, then it pops up.
buddyMood"success" | "error" | "stale" | "congrats" | "preview" | "thinking"noneWhich character the buddy is: `success` (Pip, default), `error` (Bix) for a Retry, `congrats` (Confetti) for a finish line…
burstboolean | BurstStyle | readonly string[]noneWhat flies out on click. `true` picks for the variant: confetti for most, a `"poof"` of dust (and a little head-shake) for `tomato`, the cancel/delete color. Or force `"confetti"` / `"poof"`, pass your own colors, or `false` for nothing. Skipped under reduced motion.
iconLeftReactNodenoneAn icon drawn before the label.
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" | "periwinkle" | "mint" | "tomato" | "mustard" | "plain"inkSpot color printed under the ink.

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

ButtonLink

PropTypeDefaultWhat it does
children requiredReactNode——
href requiredstring——
asElementTypeaYour router's link component, e.g. Next.js `Link`.
buddyboolean | "peek"noneSee Button: `true` always shows the buddy, `"peek"` pops it up on hover or keyboard focus.
buddyMood"success" | "error" | "stale" | "congrats" | "preview" | "thinking"noneSee Button.
burstboolean | BurstStyle | readonly string[]noneWhat flies out on click. `true` picks for the variant: confetti for most, a `"poof"` of dust (and a little head-shake) for `tomato`, the cancel/delete color. Or force `"confetti"` / `"poof"`, pass your own colors, or `false` for nothing. Skipped under reduced motion.
iconLeftReactNodenone—
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" | "periwinkle" | "mint" | "tomato" | "mustard" | "plain"inkSpot color printed under the ink.

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

Use it well

DoGive the buddy to one action per screen, the one people came to do.
Don'tLine up several tomato buttons. Destructive stands out because it's rare.

Accessibility

  • A native button element, so it works with any keyboard and screen reader.
  • Space and Enter both show the press, and focus draws a dashed cut-here line.
  • Text on every color passes WCAG AA through its contrast role.
  • Reduced motion turns off the peel, boil and ink burst; the state change still shows.
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.