Dialogue box

Dialogue box is a neobrutalist React component from Cruise UI. A game-style speech box for tours and tips: portrait, name tab, typewriter text, Next / Skip and a step count. Install it with npx shadcn@latest add @cruiseui/dialogue-box.

Install

Terminal

npx shadcn@latest add @cruiseui/dialogue-box

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

Example

Corners
Ada
AO

Welcome to Cruise UI! I'll show you around in three quick steps.

Step 1 / 3

When to use it

When to use

Onboarding tours, tips from a character, story moments in games.

When not to

Important instructions people need to find again (put them on the page).

Props

CruiseDialogueBox

PropTypeDefaultDescription
stepsCruiseDialogueStep[]——
speaker?string—Default speaker for every step.
portrait?ReactNode—Default portrait (an avatar or character), left of the text.
typewriter?booleantrueType each line out.
speed?number28Milliseconds per character when typing.
position?"inline" | "fixed""inline"—
onFinish?(() => void)—After the last step's "Done".
onSkip?(() => void)—"Skip" (all steps). Without it, there's no Skip button.
className?string——

Accessibility

  • Screen readers get the whole line at once; the typing is visual only.
  • Click, Enter or "Show all" reveals the full line; reduced motion shows it straight away.
  • Next, Skip and Done are real buttons; the step count reads "Step 2 / 5".