Browse the docs

Button

The hero sticker. Peels on hover, squishes on press, springs back. Add a buddy for the one action that matters most on a screen, and a burst for the presses worth celebrating.

Client componentWCAG AASince v0.1

Live example

Change every prop live in the playground.

Props

Button

PropTypeDefaultWhat it does
childrenrequiredReactNodenoneShort 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. 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.
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" | "tomato" | "mustard" | "mint" | "periwinkle" | "plain"inkSpot color printed under the ink.

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

ButtonLink

PropTypeDefaultWhat it does
childrenrequiredReactNodenoneShort label; lettered in Sketchpop Bold Italic, uppercase.
hrefrequiredstringnoneWhere the link goes.
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. 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.
iconLeftReactNodenoneAn icon drawn before the label.
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 <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.