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.
- Domain
- Page blocks & templates
- Support level
- Size
- 1.5 kB gzip, budget 1.1 kB
- Who uses it
- No live product imports it yet Counted in the dated inventory of 2026-11-23.
import { ClauseDemo } from "@krizaka/ui/clause-demo";Web only — React, from @krizaka/ui/clause-demo. Beta: its API may still change in a minor version.
- 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.
- Desktop · n/a. A public site's block, not a window of the Mac app.
Why it is here. The product pages' document the visitor touches (krizaka-internal#4693).
When to use
- 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.
When not to use
- For a whole report.Use instead: Analysis report
Installation
Install
npm install @krizaka/ui @krizaka/tailwind @krizaka/tokens tailwindcssStyles
@import "tailwindcss";
@import "@krizaka/tailwind";
@import "@krizaka/ui/tailwind.css";Import
import { ClauseDemo } from "@krizaka/ui/clause-demo";Examples
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 | Default | Description |
|---|---|---|---|
linesrequired | readonly ClauseLine[] | — | The document's lines, in order; those with a finding are the controls. |
titlerequired | ReactNode | — | The invitation (Touch a clause.): the section's h2. |
tag | ReactNode | — | A tag on the paper (Fictional lease). |
Accessibility
- 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.
Keyboard
| Keys | Action |
|---|---|
| Tab | Moves to the next line with a finding and shows its answer. |
Best practices
- 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.
Related components
Generated from the code of @krizaka/ui 5.3.4: its meta.ts, its examples and its types.Edit this documentation on GitHub