Skip to content
Nana UI

Data Display & Media

Checklist

A section of rules and whether each holds — loan eligibility, a tenancy application, a move-out inspection. Each row is a nana-check-item: the outcome, the rule, and what was found. summary adds a line over the list that says how it came out as a whole.

View .md Download

Write the rows as nana-check-item children when a detail needs markup of its own, or pass them as items when they come straight from data.

Membership approved You are 15,280 behind on your contributions. Clear it before borrowing. 200,000.00 of 3,130,260.00 limit

When the checks come from an API, pass them as items instead of writing children. Each is { label, status, detail?, note? }.

document.querySelector("nana-checklist").items = [
{ label: "Approved membership", status: "pass", detail: "Membership approved" },
{ label: "Contributions up to date", status: "fail", detail: "You are 15,280 behind.", note: "15,280.00 overdue" },
];

Write children when a row needs markup of its own — an amount drawn by Money, a link, or a button in the row’s action slot.

3 of 3 keys Scuffs in the hallway, within fair wear Reading taken 30 Sep. Deduct from deposit Waiting on the owner
StatusIconReads to a screen reader as
passGreen checkPassed
failRed cross, and the rule turns redFailed
warnAmber warningNeeds attention
pendingGrey clockNot checked yet
infoBlue infoFor information

summary adds a line over the list: one failure fails the list, a check still to run holds it open, and warnings let it pass with a note. Information rows are left out of the count. The summary follows the rows as they change.

npm install @nana-tec/ui-components

Or copy the source in and own it:

npx @nana-tec/ui add checklist
import "@nana-tec/ui-components/checklist";
<nana-checklist label="Loan eligibility" summary>
<nana-check-item status="pass" label="Approved membership">Membership approved</nana-check-item>
<nana-check-item status="fail" label="Contributions up to date" note="15,280.00 overdue">
You are 15,280 behind on your contributions. Clear it before borrowing.
</nana-check-item>
<nana-check-item status="pass" label="Amount within your borrowing limit">200,000.00 of 3,130,260.00 limit</nana-check-item>
</nana-checklist>

Properties

PropertyAttributeTypeDefaultDescription
itemsitemsChecklistItem[][]The rows as data, used when there are no nana-check-item children
labellabelstring''What is being checked; names the list for a screen reader and heads the summary
noDividersno-dividersbooleanfalseLeave out the lines between rows
summarysummarybooleanfalseShow a line over the list saying how it came out

Slots

SlotDescription
(default)The nana-check-item rows
header-actionsControls beside the summary, such as a re-run button

CSS parts

PartDescription
::part(base)The section
::part(header)The summary line
::part(headline)The summary's words
::part(count)How many checks passed
::part(list)The rows

CSS custom properties

PropertyDescription
--nana-checklist-dividerColour of the line between rows
--nana-check-passColour of a list where every check passed
--nana-check-failColour of a list where a check failed
--nana-check-warnColour of a list where a check needs attention
Explore Checklist interactively Every state, prop, and edge case — with live controls — in Storybook.
View in Storybook