Acceptance List
A list of pass, fail and unverified criteria with evidence, a segmented AcceptanceBar on the UI SDK Meter with an accessible summary, and AcceptancePopover, a compact header trigger that opens the list.
Example
- PassedThe build has no warningsCI run 812, 4 min
- PassedEmpty, loading and error states are designed
- FailedText meets 4.5:1 contrast in every theme2.8:1 on glass in dark mode
- Not verifiedWorks offline
acceptance-list-demo.tsxCopy code
Installation
Copy code
npm packages
lucide-reactUsage
ImportCopy code
AcceptanceList in a body, AcceptanceBar for a summary, AcceptancePopover for a header: a label, a thin bar and n/m that opens the list with its evidence.
API reference
AcceptanceList
| Prop | Type | Default |
|---|---|---|
criteriarequired | readonly AcceptanceCriterion[] | – |
labels | Partial<AcceptanceLabels> | – |
evidence`"disclosure"` keeps each criterion to one row and reveals its evidence on demand. | "inline" | "disclosure" | "inline" |
Also takes <ul> attributes and render except children.
AcceptanceBar
| Prop | Type | Default |
|---|---|---|
countsrequired | AcceptanceCounts | – |
labels | Partial<Pick<AcceptanceLabels, "bar">> | – |
formatSummary | (counts: AcceptanceCounts) => string | formatAcceptanceSummary |
Also takes every prop of UI SDK Meter except value, max, min, children.
AcceptancePopover
| Prop | Type | Default |
|---|---|---|
criteriarequired | readonly AcceptanceCriterion[] | – |
labels | Partial<AcceptanceLabels> | – |
formatSummaryThe counts in the trigger's accessible name, after the title: "Acceptance: 1 of 3 passed, 1 failed". | (counts: AcceptanceCounts) => string | formatAcceptanceSummary |
classNameClasses for the trigger, a ghost button. | string | – |
contentClassName | string | – |
Also takes PopoverProps except children.
Other exports
countAcceptancedefaultAcceptanceLabelsformatAcceptanceSummarytype AcceptanceBarPropstype AcceptancePopoverPropstype AcceptanceCountstype AcceptanceCriteriontype AcceptanceLabelstype AcceptanceListPropstype AcceptanceResultAccessibility
- Pass, fail and unverified each have an icon and a word, not only a colour.
- AcceptancePopover's trigger is a button named with the counts ("Acceptance: 1 of 3 passed, 1 failed"); it opens on hover without moving focus, and a press, Enter or a tap opens it with focus inside.
Agent actions
Agents read the counts in the trigger's name and open the popover by it.
Runs agent.snapshot() from @ui-sdk/react/agent on the live preview above.