Browse the docs
Feedback / Buddy

Buddy

A cast of characters, one per state: Pip cheers success, Bix winces at errors, Snooze dozes on stale data, Confetti celebrates, Specs previews and Hum thinks while loading. Stand one alone, or let it peek over any component.

Server componentWCAG AANew
  • Pipmood="success"Cheers when something worked: saved, sent, copied.
  • Bixmood="error"Winces when something failed and needs another try.
  • Snoozemood="stale"Dozes off when data is out of date or still waiting.
  • Confettimood="congrats"Throws a little party for milestones: shift done, all clear.
  • Specsmood="preview"Peeks at previews, drafts and things worth a look.
  • Hummood="thinking"Mulls it over while something loads or works.
Copied to clipboard
Couldn't send. Saved for later.
Shift closed. Nice work!

Last update 12 min ago

Unit positions may be stale. Pull to refresh.
#1042 · Draft

Flooded underpass on Rizal Ave

Not sent yet. Check the location before you dispatch.
Preview

Change every prop live in the playground.

Props

Buddy

PropTypeDefaultWhat it does
mood required"success" | "error" | "stale" | "congrats" | "preview" | "thinking"—Which character, and so which state it stands for.
classNamestringnone—
handsbooleanfalseShow two hands gripping the bottom edge (for peeking over things).
labelstringnoneWhat the character is telling people, e.g. "Report sent". When set, it is announced as an image; leave it out when the words are already next to it (the character is then decorative).
size"sm" | "md" | "lg"md`sm` 56px, `md` 84px, `lg` 120px wide.
styleCSSPropertiesnone—

BuddyPeek

PropTypeDefaultWhat it does
children requiredReactNode—The thing the character peeks over: a toast, a card, a callout, a button.
mood required"success" | "error" | "stale" | "congrats" | "preview" | "thinking"——
classNamestringnone—
labelstringnoneRead out with the content, e.g. "Report sent". Usually leave it out: the content already says it.
side"start" | "end"startWhich end of the top edge it peeks from.
size"sm" | "md" | "lg"none—

Use it well

DoLet one character stand for one state everywhere, so people learn to read it: Bix always means something failed.
Don'tUse a character as the only signal. Say it in words too; the character just makes it quicker to read.

Accessibility

  • Decorative by default (aria-hidden); the words next to it carry the message.
  • Pass label to announce it as an image when it stands alone.
  • Pop, wince and confetti play once; Snooze's z's and Hum's bubbles keep going while the state lasts. Everything holds still under reduced motion.
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.