Clause demo
The lines of a document the visitor hovers, taps or reaches with the keyboard, and beside them what the check said of each: its verdict, the words it quotes and the reference it cites.
- Domaine
- Blocs de page et gabarits
- Niveau de support
- Taille
- 1.5 kB gzip, budget 1.1 kB
- Qui l'utilise
- Aucun produit en production ne l'importe encore Compté dans l'inventaire daté du 2026-11-23.
import { ClauseDemo } from "@krizaka/ui/clause-demo";Web uniquement — React, depuis @krizaka/ui/clause-demo. Bêta : son API peut encore changer à une version mineure.
- Mobile · n/a. A public web page's demo; in a phone app the real report is the product's own screen, a list of findings with their detail.
- Bureau · n/a. A public site's block, not a window of the Mac app.
Pourquoi il est là. The product pages' document the visitor touches (krizaka-internal#4693).
Quand l’utiliser
- A product page lets the visitor try the proof: touch a line, read the verdict.
- The data of a recorded run is at hand, not a video of it.
Quand ne pas l’utiliser
- For a whole report.À la place : Analysis report
Installation
Installer
npm install @krizaka/ui @krizaka/tailwind @krizaka/tokens tailwindcssStyles
@import "tailwindcss";
@import "@krizaka/tailwind";
@import "@krizaka/ui/tailwind.css";Importer
import { ClauseDemo } from "@krizaka/ui/clause-demo";Exemples
A fictional lease
Three lines, two with a finding; it opens on the line to check.
Props
A document whose lines answer the hand: hover, tap or Tab to a line, read its verdict, quote and reference.
| Prop | Type | Défaut | Description |
|---|---|---|---|
linesrequis | readonly ClauseLine[] | — | The document's lines, in order; those with a finding are the controls. |
titlerequis | ReactNode | — | The invitation (Touch a clause.): the section's h2. |
tag | ReactNode | — | A tag on the paper (Fictional lease). |
Accessibilité
- Each line with a finding is a real
button(aria-pressed,aria-controlsthe answer); hover, tap and focus open it. - The answer is a polite live region: the verdict is read when it changes.
Clavier
| Touches | Action |
|---|---|
| Tab | Moves to the next line with a finding and shows its answer. |
Bonnes pratiques
- Lines and findings come from a recorded run, never typed for the page; the verdict's words are the product's (
To check). - It opens on the first
dangerline: the visitor sees the point at once. - Three to six lines; the lines without a finding stay quiet text, not controls.
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