Composants
Speed lines
Manga action lines behind a hero element: a burst around it or streaks across it, drawn in SVG, deterministic and still under reduced motion.
import { SpeedLines } from "@krizaka/ui/speed-lines";Web uniquement — React, depuis @krizaka/ui/speed-lines. Bêta : son API peut encore changer à une version mineure.
- Mobile · ✗ à construire. It comes with the native paper roles of the Cahier. issue #421
Pourquoi il est là. The tool sites (krizaka/krizaka-ui#548): the motion lab's live demo, then the heroes of the other tool sites.
Quand l’utiliser
- Behind the one element a page wants you to look at: a hero title, a live demo, a versus card.
- To give an action — a launch, a release — the energy of a manga panel without moving anything.
Quand ne pas l’utiliser
- A soft backdrop behind a whole section.À la place : Section backdrop
Installation
Installer
npm install @krizaka/ui @krizaka/tailwind @krizaka/tokens tailwindcssStyles
@import "tailwindcss";
@import "@krizaka/tailwind";
@import "@krizaka/ui/tailwind.css";Importer
import { SpeedLines } from "@krizaka/ui/speed-lines";Exemples
Behind a hero
A radial burst behind the title that opens a page.
Across a demo
kind="horizontal" streaks behind a live demo.
Props
Manga action lines behind a hero element: a burst or streaks in SVG, still under reduced motion.
| Prop | Type | Défaut | Description |
|---|---|---|---|
animated | boolean | false | A slow pulse of the lines; off under reduced motion. |
clear | number | 34 | For radial: the share of the height left clear around the centre, 0 to 80. |
count | number | 36 | How many lines (4 to 120). |
kind | "horizontal" | "radial" | radial | radial bursts from the centre; horizontal streaks across. |
Accessibilité
- The lines are decoration: the SVG is hidden from assistive technology, the content in front is the real element.
- The lines are static; the optional pulse is removed under
prefers-reduced-motion. - The ink is a quiet text colour at low opacity, so it never competes with the content for contrast.
Bonnes pratiques
- One burst per screen, behind one element; the lines are quiet by design (a fraction of the text's ink).
- Keep
clearlarge enough that the lines never touch the text: the content is always the first thing read. - Use
horizontalbehind a live demo that moves, andradialbehind a title that arrives. - Leave
animatedoff unless the page needs a pulse: it stops under reduced motion anyway.
Composants liés
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