Checklist
An onboarding list: "Get set up, 3 of 5 done", each step a link to where it is
done. Covers checklist and checklist-item.

Plain Blade: the items are native disclosures and open with no script.
collapsible needs Alpine, as
panel's does, and dismissKey needs Alpine and the package's
script.
Use it
<x-ds::checklist title="Get set up" dismissKey="setup-{{ $team->id }}">
<x-ds::checklist-item label="Create your workspace" :done="true" />
<x-ds::checklist-item label="Invite your team" :done="$team->users_count > 1"
description="Everyone you invite gets an email." :href="route('team.invite')" actionLabel="Invite people" />
<x-ds::checklist-item label="Connect your domain" :done="$team->domain_verified"
description="Add a CNAME record pointing at us." :href="route('domains')" />
<x-ds::checklist-item label="Add a payment method" :done="$team->hasPaymentMethod()"
description="Needed before your trial ends." :href="route('billing')" />
<x-ds::checklist-item label="Install the mobile app" :optional="true" :done="$user->has_app"
description="On iOS and Android." :href="route('apps')" />
</x-ds::checklist>
Done is detected, never ticked
There are no checkboxes. Each item says whether the work is done, and the
host decides that from the data: the domain verifies, the first invite is
accepted. A box the reader ticks records only that they ticked it, and a
checklist that can be ticked without doing the work is a checklist that lies.
So every item is a link (or a button in its action slot) to the real task,
and comes back done once it is.
What it does
- Counts itself. "3 of 5 done" and the progress bar are counted from the items, so the host never says it twice. Optional items are marked "Optional" and left out of the count: the total is the work that finishes it.
- Opens one item. The item marked
current, or else the first required item not done, is open on first paint with its description and action; the rest open on click. The items share a name, so opening one closes the other, where the browser supports it (everywhere current); elsewhere several can be open at once. - Ends. Once every required item is done, the progress bar gives way to a
completion line (
completeText, or thecompletionslot). WithdismissKey, a Dismiss button there puts the list away for good: the dismissal is kept in localStorage under the key and checked before the first paint, as announcement bar's is. - Folds away.
collapsiblemakes the heading a button, as on a panel.
An item with no description, href or action is a plain row that does not
open.
checklist props
| Prop | Type | Default | What it does |
|---|---|---|---|
title | string | — | The heading, and the progress bar's name. Required. |
collapsible | bool | false | The heading becomes a button that folds the list away. Needs Alpine. |
open | bool | true | With collapsible, whether it starts open. |
dismissKey | string | — | A localStorage key. When complete, Dismiss puts the list away for good. Needs Alpine and the script. |
progressText | string | :done of :total done | Under the heading. |
completeText | string | You are all set. | The completion line. |
dismissLabel | string | Dismiss | The dismiss button's words. |
nonce | string | Vite's | The CSP nonce for the dismissKey check. |
| Slot | |
|---|---|
| default | The items. |
completion | Replaces completeText. |
checklist-item props
| Prop | Type | Default | What it does |
|---|---|---|---|
label | string | — | The task. Required. |
description | string | — | Shown when the item is open. |
done | bool | false | Done, as you have detected it. |
href | string | — | Where the task is done. Draws a button in the open item. |
actionLabel | string | Start | That button's words. |
current | bool | false | Open this item rather than the first not done. |
optional | bool | false | Not needed to finish: left out of the count. |
doneText todoText optionalText | string | Done Not done Optional | The state in words. |
Plus an action slot, for a button of your own (a form that does the task in
place, say).
Dismissed for good
@unless ($team->onboarding_dismissed)
<x-ds::checklist title="Get set up" dismissKey="setup-{{ $team->id }}"
x-on:dismiss="$wire.dismissOnboarding()">
…
</x-ds::checklist>
@endunless
localStorage is per browser. To make it stick everywhere, listen for dismiss
(it bubbles from the list) and remember it on the server too.
Accessibility
- An ordered list, under a heading, with a progress bar named by the title.
- Each item's state is in words before its label, "Done: Invite your team", so it is not carried by the tick alone.
- An item is a native
details: its summary is a button that says whether it is expanded, and Enter or Space opens it. Its action is an ordinary link. - Find-in-page finds the text of a closed item, and opens it in browsers that
open a
detailsfor a match (Chromium does; check the others you support).
| Key | Where | Does |
|---|---|---|
| Tab | anywhere | moves through the item summaries, and the open item's action |
| Enter / Space | on a summary | opens or closes that item |
Don't
- Don't add a checkbox. See above.
- Don't list more than about seven. Onboarding longer than that is a manual.
- Don't keep it after it is done, unless the reader may want to look back.
Give it a
dismissKey.
More in specs/checklist.md.
From the package repo: edit this page on GitHub.