Skip to content
Eskais UI

Agent tasks

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

Installation

npx shadcn@latest add @eskais/acceptance-list
Brings alongcollapsiblepopover
npm packageslucide-react

Usage

Import
import {  AcceptanceBar,  AcceptanceList,  AcceptancePopover,  countAcceptance,  defaultAcceptanceLabels,  formatAcceptanceSummary,} from "@/components/ui/acceptance-list"

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

PropTypeDefault
criteriarequiredreadonly AcceptanceCriterion[]–
labelsPartial<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

PropTypeDefault
countsrequiredAcceptanceCounts–
labelsPartial<Pick<AcceptanceLabels, "bar">>–
formatSummary(counts: AcceptanceCounts) => stringformatAcceptanceSummary

Also takes every prop of UI SDK Meter except value, max, min, children.

AcceptancePopover

PropTypeDefault
criteriarequiredreadonly AcceptanceCriterion[]–
labelsPartial<AcceptanceLabels>–
formatSummaryThe counts in the trigger's accessible name, after the title: "Acceptance: 1 of 3 passed, 1 failed".(counts: AcceptanceCounts) => stringformatAcceptanceSummary
classNameClasses for the trigger, a ghost button.string–
contentClassNamestring–

Also takes PopoverProps except children.

Other exports

countAcceptancedefaultAcceptanceLabelsformatAcceptanceSummarytype AcceptanceBarPropstype AcceptancePopoverPropstype AcceptanceCountstype AcceptanceCriteriontype AcceptanceLabelstype AcceptanceListPropstype AcceptanceResult

Accessibility

  • 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.