Stage banner
The announcement of a chapter: a stage and its name on one line, or, large, a stage above a title and a line — a sober eyebrow by default, a stage call that slams in for the arcade flavour.
Web uniquement — React, depuis @krizaka/ui/stage-banner. Bêta : son API peut encore changer à une version mineure.
Quand l’utiliser
- Before a chapter's heading on a told page or a tour (“Step 02 · Payments”).
- To open a section that turns the story (
size="lg"): a final chapter, a reveal.
Quand ne pas l’utiliser
Installation
Installer
npm install @krizaka/ui @krizaka/tailwind @krizaka/tokens tailwindcssStyles
@import "tailwindcss";
@import "@krizaka/tailwind";
@import "@krizaka/ui/tailwind.css";Importer
import { StageBanner } from "@krizaka/ui/stage-banner";Exemples
Before a chapter
A stage and its name, sober then in the arcade flavour.
A section's opening
size="lg": the stage, a title and a line — sober, then a final round.
Props
Announces a chapter: a stage and its name on one line, or (size="lg") a stage, a title and a line, centred.
| Prop | Type | Défaut | Description |
|---|---|---|---|
stagerequis | ReactNode | — | Where the reader is: “Step 02”, “Chapter 3”, “Final round”. |
brand | string | — | A brand scope (orochia → .brand-orochia). |
name | ReactNode | — | sm: the name of the chapter, beside the stage. |
size | "sm" | "lg" | sm | sm: one line, before a chapter's heading. lg: centred, the stage above a title and a line — a section's opening. |
subtitle | ReactNode | — | lg: one line under the title. |
title | ReactNode | — | lg: the title under the stage. |
titleAs | "h2" | "h3" | "p" | p | The element of the lg title: a heading when the banner opens a section that has none. |
variant | StoryVariant | default | default: a sober eyebrow. arcade: the stage call — a skewed plate that slams in, a light that sweeps it. |
Accessibilité
- A paragraph by default; the large title can be a heading (
titleAs). - Its entrance plays once in a stage and never under
prefers-reduced-motion.
Bonnes pratiques
- Few words: the stage (“Step 02”) and a name of one or two words.
- With
size="lg"and no heading after it, passtitleAs="h2"so the section keeps its heading.
Composants liés
Générée depuis le code de @krizaka/ui 2.10.0 : son meta.ts, ses exemples et ses types.Modifier cette documentation sur GitHub
Pointer light
The light that follows the pointer over a group of cards: one passive listener writes the pointer's position into the card it is over, the card's CSS draws the light.
Table of contents
The sections of a reading page: sticky beside the content on a wide screen, a row of chips that scrolls sideways on a phone, the section being read marked — with TocLayout to place it.