Achievement toast

Achievement toast is a neobrutalist React component from Cruise UI. A game toast: trophy chip, "Achievement unlocked", the title, a line and an XP reward. Install it with npx shadcn@latest add @cruiseui/achievement-toast.

Install

Terminal

npx shadcn@latest add @cruiseui/achievement-toast

First time? Installation shows the one-off components.json setup (the @cruiseui registry) and how to turn the theme on.

Example

Corners
Achievement unlocked

First ride

You booked your first trip.

+100 XP

When to use it

When to use

Celebrating a milestone in a game or a gamified app.

When not to

Errors or anything people must act on (use a Toast or an Alert).

Props

CruiseAchievementToast

PropTypeDefaultDescription
titleReactNode——
children?ReactNode——
xp?number—Reward, shown as "+100 XP".
icon?ReactNode—Default: Lucide trophy.
eyebrow?string"Achievement unlocked"—
duration?number4000Milliseconds before onDismiss is called; 0 keeps it open.
onDismiss?(() => void)——
className?string——

Accessibility

  • role="status": announced politely, never interrupts.
  • Closes itself after about 4 seconds; it has a Dismiss button too.
  • No pop-in movement under reduced motion.