Provenance Text
betaText that shows who wrote each part of it — the person, an agent or a quoted source — with each author's share.
- AI
- 2 files
- 2 npm packages
- Accessibility notes
pnpm dlx @dowel-ui/cli add provenance-textnpm packages installed: class-variance-authority, diff.
import { ProvenanceLegend } from "@/components/ui/provenance-text";Default
Hidden
While Editing
In Your Own Layout
<ProvenanceLegend>
| Prop | Type | Default |
|---|---|---|
authors (required) | ProvenanceAuthors | — |
segments (required) | readonly ProvenanceSegment[] | — |
Plus every attribute of <ul> except children.
<ProvenanceInline>
| Prop | Type | Default |
|---|---|---|
authors (required) | ProvenanceAuthors | — |
segments (required) | readonly ProvenanceSegment[] | — |
showWhether to mark who wrote what. Off, it is plain text. | boolean | true |
Plus every attribute of <span> except children.
<ProvenanceText>
| Prop | Type | Default |
|---|---|---|
authors (required) | ProvenanceAuthors | — |
segments (required) | readonly ProvenanceSegment[] | — |
defaultShow | boolean | false |
onShowChange | (show: boolean) => void | — |
showControlled: whether who wrote what is shown. | boolean | — |
toggleLabelThe toggle's name. It stays the same pressed or not; its state is announced. | string | "Show who wrote what" |
Plus every attribute of <div> except children.
8/8
checks passed
- Tested — passes
- axe assertion — passes
- Keyboard tested — does not apply
- Storybook examples — passes
- Accessibility documented — passes
- Semantic tokens only — passes
- Motion from tokens — passes
- className merged — passes
- Visible focus — does not apply
- No fixed widths — passes