ComposantsBlocs de page et gabarits
Story scroll
One journey told while the visitor scrolls: a sticky scene that changes with each step, its light shifting colour, a guide bird and a pen stroke that joins the steps; one still plate under reduced motion.
- Domaine
- Blocs de page et gabarits
- Niveau de support
- Taille
- 1.5 kB gzip, budget 1.2 kB
- Qui l'utilise
- Aucun produit en production ne l'importe encore Compté dans l'inventaire daté du 2026-11-23.
import { StoryScroll, STORY_CUES, STORY_LIGHTS } from "@krizaka/ui/story-scroll";Web uniquement — React, depuis @krizaka/ui/story-scroll. Bêta : son API peut encore changer à une version mineure.
- Mobile · n/a. A scroll-driven showcase of a public web page; a phone app tells the same steps with Stepper or a paged list of native screens.
- Bureau · n/a. A public site's block, not a window of the Mac app.
Pourquoi il est là. The product pages' one journey told while scrolling (krizaka-internal#4693).
Quand l’utiliser
- A product page tells its one journey, three to five steps, on one object that changes.
- The steps must stay readable text while the scene illustrates them.
Quand ne pas l’utiliser
- For steps the reader clicks through, with recordings.À la place : Step showcase
- For a list of features side by side.À la place : Card grid
Installation
Installer
npm install @krizaka/ui @krizaka/tailwind @krizaka/tokens tailwindcssStyles
@import "tailwindcss";
@import "@krizaka/tailwind";
@import "@krizaka/ui/tailwind.css";Importer
import { StoryScroll, STORY_CUES, STORY_LIGHTS } from "@krizaka/ui/story-scroll";Exemples
A document's journey
The file arrives, is read, a clause lights up, its reference attaches, you decide under a stamp.
Props
One sticky scene and the steps that pass beside it (beneath it on a phone).
| Prop | Type | Défaut | Description |
|---|---|---|---|
labelrequis | string | — | The section's accessible name. |
scenerequis | ReactNode | — | The scene: one object that changes with the step (decorative: hidden from assistive technology). |
stepsrequis | readonly StoryStep[] | — | Three to five steps, in the journey's order. |
guide | "falcon" | "owl" | "duck" | "flamingo" | "pigeon" | "lovebird" | "crane" | "magpie" | "beaver" | — | The bird that guides each step, beside the scene. |
Accessibilité
- A named
section; each step is anh2, the step in view isaria-current="step". - The scene, the guide and the ticks are decorative (
aria-hidden). - Under reduced motion the scene is one plate at the journey's end and every step is fully legible.
Bonnes pratiques
- Three to five steps, each title at most five words.
- The scene is markup that reacts to
data-cueanddata-cues(DocumentSceneof@krizaka/ui/product-pagefor a document); keep its words out of it. - A step's
lightis a brand or status role (accent,accent-2,danger…), never a colour. - Give the guide bird of the product (
owlreads documents); its mood follows the steps.
Composants liés
Générée depuis le code de @krizaka/ui 5.3.4 : son meta.ts, ses exemples et ses types.Modifier cette documentation sur GitHub