Canvas Design System
Main Site Tokens

Checklist

An icon-prefixed list for benefit and feature copy — presentational, not interactive.

When to Use

Use when: You're listing what something includes — plan features, workshop inclusions, benefit bullets on a marketing page. Each item is a short affirmative phrase.
Don't use when: The user has to tick things off — nothing here is clickable. For trackable tasks use Task Checklist; for real checkbox input use Checkbox Card Group.

Variants

Default

  • Pre-built workshop agendas
  • Exercises for every challenge
  • AI-powered facilitation coaching
  • Drag-and-drop workshop planner
<?= ws_checklist([
    'Pre-built workshop agendas',
    'Exercises for every challenge',
    'AI-powered facilitation coaching',
]) ?>

Compact

Tighter vertical rhythm for sidebars, cards, and constrained columns.

  • Includes prep mode
  • Live session tracking
  • Post-session reflection
<?= ws_checklist($items, ['variant' => 'compact']) ?>

Custom icon

Any Material icon replaces the default check. Keep one icon per list — the icon marks the list's character, it doesn't vary by item.

Stars

  • Top-rated exercises
  • Expert-curated agendas
  • Community favourites

Lightning

  • Quick 5-min setup
  • Instant AI feedback
  • Real-time suggestions
<?= ws_checklist($items, ['icon' => 'star']) ?>
<?= ws_checklist($items, ['icon' => 'bolt']) ?>

States

StateBehavior
DefaultThe only state. Items are static <li>s with no hover, focus, checked, or disabled treatment.
Empty arrayRenders an empty <ul> — invisible but present in the DOM. Guard on the array before calling.
Long itemsText wraps and stays aligned; the icon holds its own column rather than sitting inline with the first word.

Real-World Usage

A pricing tier's inclusion list — compact variant inside the plan card, items pulled from the tier definition so the copy and the entitlement never drift apart.

Pro

Everything in Free, plus:

  • Unlimited saved workshops
  • AI Coach during live sessions
  • Synthesize post-session readouts
  • Export to PDF and Miro
<?= ws_checklist($tier['features'], ['variant' => 'compact']) ?>

Options

OptionTypeDefaultPurpose
$itemsarrayrequiredPositional array of plain strings. Each is escaped, so markup inside an item is shown literally rather than rendered.
iconstring'check_circle'Material icon name, applied to every item
variantstring'default'default | compact. Only non-default emits a modifier class.
idstringnullElement ID on the <ul>
classstring''Additional CSS classes

Accessibility

ConcernBehavior
SemanticsA real <ul> of <li>s, so screen readers announce it as a list with an item count and let users jump between items. No ARIA is needed or added.
KeyboardNot interactive and not focusable — correctly absent from the tab order.
EscapingItem text runs through htmlspecialchars(), so user-supplied strings are safe here.
Not a form controlThe checkmark is decoration, not state. Never use this list to represent things the user has completed — a screen-reader user has no way to tell a "done" check from a "included" check.
Icon announcementKnown gap: the icon <span> has no aria-hidden="true". Material Symbols render from ligature text, so some screen readers read the raw glyph name — "check circle" before every item. Harmless but noisy; worth fixing in the template.
ContrastIcons use --mainsite-primary and text uses --text-default, both tested against the page surface.

Tokens

TokenUsed for
--mainsite-primaryIcon colour
--text-defaultItem text
--space-2 / --space-3Icon-to-text gap and the gap between items (tightened by compact)
--text-body / --text-small / --text-meta / --text-h3Type scale across variants
--font-bodyBody face

CSS Classes

ClassPurpose
.ws-checklistThe <ul> — resets list styling and sets the item rhythm
.ws-checklist--compactTighter spacing
.ws-checklist__itemEach <li>
.ws-checklist__iconLeading icon wrapper
.ws-checklist__textItem text wrapper

Files

FilePurpose
includes/components/helpers.phpws_checklist() helper function
includes/components/checklist.phpTemplate — list markup and escaping
includes/components/components.cssStyles (.ws-checklist rules)