Krizaka UI
Krizaka UI
Patrons

Step showcase

A product's guided tour in one device frame — phone, browser or macOS window: the steps beside it, each real recording played muted then the next, crossfading; it plays only in view, holds on hover and focus, and keeps a pause button.

Web · ✓Mobile · n/aBureau · ✓BêtaBlocs
import { StepShowcase, DeviceFrame, stepShowcaseLabels } from "@krizaka/ui/step-showcase";

Web uniquement — React, depuis @krizaka/ui/step-showcase. Bêta : son API peut encore changer à une version mineure.

  • Mobile · n/a. A product site's tour of the app; inside the phone app the real screens are the tour.

Pourquoi il est là. Used by Orazaka, Akinaza.

Quand l’utiliser

  • A landing page's “see it work”: three to five steps of the real app recorded on the device it runs on.
  • The same tour on several devices: one StepShowcase per tab (Web · Mobile · Mac).

Quand ne pas l’utiliser

  • For a gallery of results that should move on its own.
  • For a single video with its controls.À la place : Video player
  • For the steps of a form the person is filling.À la place : Step progress

Installation

Installer

npm install @krizaka/ui @krizaka/tailwind @krizaka/tokens tailwindcss

Styles

@import "tailwindcss";
@import "@krizaka/tailwind";
@import "@krizaka/ui/tailwind.css";

Importer

import { StepShowcase, DeviceFrame, stepShowcaseLabels } from "@krizaka/ui/step-showcase";

Exemples

In your pocket

Four steps of a phone app beside one phone; resize to a phone: dots, swipe.

On your Mac

A macOS window: the control panel, the local stack starting, the workspace.

Props

DeviceFrame

A phone, a browser window or a macOS window around a screen of content.

PropTypeDéfautDescription
kindrequisDeviceKind—The device: a phone, a browser window or a macOS window.
titlestring—The browser's address or the window's title (“dev.orazaka.com”, “Orazaka”).

StepShowcase

One device frame, its steps beside it, playing each recording then the next — a product's guided tour.

PropTypeDéfautDescription
devicerequisDeviceKind—The device the recordings were made on.
labelrequisstring—The sequence's accessible name (“Orazaka in your pocket”), passed translated.
stepsrequisreadonly ShowcaseStep[]—The steps, in the order of the journey.
autoplaybooleantrueMoves on by itself (never under reduced motion).
defaultIndexnumber0The step shown first.
deviceTitlestring—The browser's address or the window's title.
labelsStepShowcaseLabels{ play: "Play the steps", pause: "Pause the steps", step: (n, total) => `Step ${n} of ${total}`, }The controls' words, translated.
onIndexChange((index: number, user: boolean) => void)—Called when the step changes — user is true when the visitor asked for it.

Accessibilité

  • A region (aria-roledescription="carousel") named by label; the steps are a vertical tablist, the frame its tabpanel named by the current step.
  • WCAG 2.2.2: a visible pause button; the tour also holds while the pointer is over it, while a focus is inside and while it is off screen.
  • The video is decorative (aria-hidden): the poster's alt and the step's words carry the meaning. No native controls, never sound.
  • Under prefers-reduced-motion: posters only, no autoplay, the steps change on demand.

Clavier

TouchesAction
TabThe current step, then play / pause.
↑ ↓ ← →The previous or next step.
Enter / SpaceOn a step: show it. On play / pause: stops or restarts the tour.

Bonnes pratiques

  • Record the real app (a demo persona, never a mock-up); 4–8 s per step, muted, no captions burnt in.
  • Give every step a poster (the first frame) and an alt: it is what loads first and all that shows under reduced motion.
  • A title of two or three words and one line per step; the order is the journey (sign in → make → ask → follow).
  • WebM first, MP4 as the fallback; a step without a video stays duration ms.

Générée depuis le code de @krizaka/ui 3.63.1 : son meta.ts, ses exemples et ses types.Modifier cette documentation sur GitHub

Sur cette page