Components
Things to build with. Each has a main class, classes for its parts, and classes for its variations. They draw everything from the tokens, so they follow the theme and the Appearance page, including the look applied to the site.
- Button
- Form field
- Inputs, dropdowns and text areas
- Input group
- Checkboxes, radios and toggles
- Card
- Card list and grid list
- Link list
- Expanding card
- Table
- Badge
- Callout
- Toolbar
- Description list
- Empty state
- Bar list
- Progress
- Disclosure
- Accordion
- Tabs
- Popover
- Popover panel
- Menu
- Dialog
- Tree
- Embed
- Prose
- Code block
- Matrix
Button
An action: a <button>, an <a> or an <input type="submit">. A secondary button by default.
| Class | What it does |
|---|---|
fz-btn | A secondary button. |
fz-btn-- | The main action. Usually one per area. |
fz-btn-- | A destructive action, such as delete. |
fz-btn-- | No border or background until hovered, for less important actions. |
fz-btn-- | Smaller or larger. |
fz-btn-- | Square, for an icon on its own. Give it an aria-label. |
fz-btn-- | The full width of its container. |
- Use a
<button>for an action on the page and an<a>for going somewhere else; they look the same. - A disabled button, or one with
aria-disabled="true", is faded.
<div class="fz-cluster">
<button type="button" class="fz-btn fz-btn--primary">Save</button>
<button type="button" class="fz-btn">Cancel</button>
<a href="#" class="fz-btn fz-btn--ghost">View history</a>
<button type="button" class="fz-btn fz-btn--danger">Delete</button>
<button type="button" class="fz-btn fz-btn--sm">Small</button>
<button type="button" class="fz-btn fz-btn--lg">Large</button>
<button type="button" class="fz-btn fz-btn--icon" aria-label="Settings">⚙</button>
<button type="button" class="fz-btn" disabled>Disabled</button>
</div>Form field
A label, a control and its help text.
| Class | What it does |
|---|---|
fz-field | The field: its label above its control. |
fz-field__ | The label: a <label for="…">, or a <legend> on a <fieldset>. |
fz-field__ | The required marker, inside the label. |
fz-field__ | The control and its help text. |
fz-field__ | Help text, or an error message. |
fz-field-- | The label beside the control, stacking when there isn't room. |
- For a group of choices, use
fz-fieldon a<fieldset>, with a<legend class="fz-field__label">. - Connect help text to its control with aria-describedby, so screen readers read it too.
<div class="fz-stack">
<div class="fz-field">
<label class="fz-field__label" for="sg-name">Student name <span class="fz-field__req" aria-hidden="true">*</span></label>
<div class="fz-field__body">
<input class="fz-input" id="sg-name" required aria-describedby="sg-name-help">
<p class="fz-field__help" id="sg-name-help">As it appears on the student's report card.</p>
</div>
</div>
<div class="fz-field fz-field--horizontal">
<label class="fz-field__label" for="sg-school">School</label>
<div class="fz-field__body"><input class="fz-input" id="sg-school"></div>
</div>
</div>Inputs, dropdowns and text areas
Text-like inputs, dropdowns and text areas, sharing one look. Their height is the field height, which the site's look sets.
| Class | What it does |
|---|---|
fz-input | An <input>: text, email, number, date and the like. |
fz-select | A <select>, with its own chevron. |
fz-textarea | A <textarea>, several lines, taller when dragged. |
aria-invalid="true"marks a control as invalid. Say what is wrong in the field's help text too, since the colour alone doesn't.
<div class="fz-auto-grid fz-auto-grid--max-2 fz-auto-grid--wide">
<input class="fz-input" placeholder="A text input" aria-label="A text input">
<select class="fz-select" aria-label="A dropdown"><option>Grade 6</option><option>Grade 7</option></select>
<input class="fz-input" value="not-an-email" aria-invalid="true" aria-label="An invalid input">
<input class="fz-input" value="Disabled" disabled aria-label="A disabled input">
<textarea class="fz-textarea" placeholder="A text area" aria-label="A text area"></textarea>
</div>Input group
An input with text or an icon attached before or after it, such as a currency or a unit.
| Class | What it does |
|---|---|
fz-input-group | Wraps an fz-input and its add-ons. |
fz-input-group__ | The attached text or icon. |
<div class="fz-input-group" style="max-width: 20rem">
<span class="fz-input-group__addon">$</span>
<input class="fz-input" inputmode="decimal" value="120.00" aria-label="Program fee">
<span class="fz-input-group__addon">CAD</span>
</div>Checkboxes, radios and toggles
Real checkboxes and radio buttons, drawn in the theme's colours; a toggle is a checkbox drawn as an on/off switch.
| Class | What it does |
|---|---|
fz-checkbox | An <input type="checkbox">. |
fz-radio | An <input type="radio">. |
fz-toggle | An <input type="checkbox"> drawn as a switch. |
fz-choice | A <label> around a checkbox, radio or toggle and its text, all of it clickable. |
fz-choice-group | A set of choices, one below the other. |
<div class="fz-switcher">
<fieldset class="fz-field">
<legend class="fz-field__label">Transportation</legend>
<div class="fz-choice-group">
<label class="fz-choice"><input type="radio" class="fz-radio" name="sg-t" checked> Bus</label>
<label class="fz-choice"><input type="radio" class="fz-radio" name="sg-t"> Picked up by a parent</label>
</div>
</fieldset>
<div class="fz-choice-group">
<label class="fz-choice"><input type="checkbox" class="fz-checkbox" checked> Photo consent</label>
<label class="fz-choice"><input type="checkbox" class="fz-toggle" checked> Email updates</label>
</div>
</div>Card
A surface for one thing: an entry, a summary, a group of fields. Its children are stacked 3 steps apart.
| Class | What it does |
|---|---|
fz-card | The card. |
fz-card__ | A row for the title and any actions, wrapping when out of room. |
fz-card__ | The title, on a heading that fits the page (h2, h3…). |
fz-card__ | A line of secondary text under the title. |
fz-card__ | A row at the bottom, separated by a line. |
fz-card-- | No padding: for a table or an image that should reach the edges. |
fz-card-- | The whole card is clickable, through its fz-card__link. |
fz-card__ | The one link the whole card clicks through to: on the link, or on an element around it when the link is generated for you, such as by viewEntryLink() in a list template. |
- In an interactive card, other links and buttons still work on their own.
<div class="fz-auto-grid fz-auto-grid--max-2 fz-auto-grid--wide">
<article class="fz-card">
<div class="fz-card__header">
<div><h3 class="fz-card__title">Robotics club</h3><p class="fz-card__subtitle">Thursdays, 3:30 to 5pm</p></div>
<span class="fz-badge fz-badge--success">Open</span>
</div>
<p>An after-school program for students in grades 6 to 8.</p>
<div class="fz-card__footer"><span class="fz-text-muted fz-text-sm">18 of 24 places taken</span><button type="button" class="fz-btn fz-btn--sm fz-ms-auto">Register</button></div>
</article>
<article class="fz-card fz-card--interactive">
<h3 class="fz-card__title"><a href="#" class="fz-card__link">Coding camp</a></h3>
<p class="fz-text-muted">The whole card is a link.</p>
<div class="fz-cluster"><span class="fz-badge fz-badge--warning">Waitlist</span></div>
</article>
</div>Card list and grid list
A list of entries shown as cards instead of table rows: one below the other, or in columns.
| Class | What it does |
|---|---|
fz-card-list | On a <ul> or <ol>: cards one below the other. |
fz-grid-list | On a <ul> or <ol>: cards in columns, like fz-auto-grid. |
fz-grid-list-- | At most this many columns. |
fz-grid-list-- | Columns as narrow as 8rem, or at least 18rem. |
- Give each
<li>thefz-cardclass.
<ul class="fz-grid-list fz-grid-list--max-3">
<li class="fz-card fz-card--interactive"><h3 class="fz-card__title fz-card__link"><a href="#">Amira Haddad</a></h3><div class="fz-cluster"><span class="fz-badge fz-badge--success">Approved</span><span class="fz-badge">Grade 7</span></div></li>
<li class="fz-card fz-card--interactive"><h3 class="fz-card__title fz-card__link"><a href="#">Liam Chen</a></h3><div class="fz-cluster"><span class="fz-badge fz-badge--warning">Under review</span><span class="fz-badge">Grade 8</span></div></li>
<li class="fz-card fz-card--interactive"><h3 class="fz-card__title fz-card__link"><a href="#">Sofia Rossi</a></h3><div class="fz-cluster"><span class="fz-badge fz-badge--info">Submitted</span><span class="fz-badge">Grade 6</span></div></li>
</ul>Link list
Links to other pages, one to a row, each with an arrow at its end: the screens in a section of the menu, or a set of places to go next.
| Class | What it does |
|---|---|
fz-link-list | On a <ul> or <ol>, with an <a> in each <li>. Each link fills its row and is shaded under the pointer. |
- The links need no classes of their own.
- In a card, the list reaches a little into the card's padding, so the text of the links lines up with the rest of the card and their shading has room around it.
- It is for going somewhere. For actions on the page, use buttons.
<div class="fz-auto-grid fz-auto-grid--max-2 fz-auto-grid--wide">
<section class="fz-card">
<h3 class="fz-card__title">Programs</h3>
<ul class="fz-link-list">
<li><a href="#">Applications</a></li>
<li><a href="#">Interview schedule</a></li>
<li><a href="#">Offers</a></li>
</ul>
</section>
<section class="fz-card">
<h3 class="fz-card__title">Reports</h3>
<ul class="fz-link-list">
<li><a href="#">Enrolment by program</a></li>
<li><a href="#">Attendance summary</a></li>
</ul>
</section>
</div>Expanding card
Cards that are all the same height, side by side in a grid, however much each one holds. One with more than fits opens over the cards below it, so nothing on the page moves.
| Class | What it does |
|---|---|
fz-expand-card | On each child of the grid, with one fz-card in it. It keeps its place and its height in the grid, and the card is laid over it. |
fz-expand-card-- | The card has more than fits: it is cut off under a fade with a chevron pointing down. Added by Formulize's script, formulize-ui.js; don't add it yourself. |
fz-expand-card-- | The card is too tall to open all the way: open, it is as tall as an open card may be, and scrolls inside. It keeps room for a scrollbar, open or closed, so its contents don't move when the scrollbar comes and goes. Added by the script. |
fz-expand-card-- | The grid has one column, as on a phone: the card is as tall as all it holds, and never opens. Added by the script. |
fz-expand-card-- | Opened by a tap. Added and taken away by the script. |
fz-expand-card-- | Closed with Esc, until the pointer or the focus leaves it or the focus moves on inside it. Added and taken away by the script. |
- A card with more than fits opens to its full height under the pointer, when anything in it has the keyboard's focus, and when it is tapped. The first tap on it opens it, and doesn't follow the link under the finger; a tap anywhere else closes it. Esc closes it too.
- An open card is raised over what is below it, with a shadow. A very long one is no taller than most of the window, and scrolls inside, once it has finished opening.
- Nothing else on the page moves while a card opens or closes, and nothing in the card moves either.
- A card whose contents fit has no fade and doesn't open.
- Everything in a card is on the page when it is closed, so a screen reader reads all of it and the Tab key reaches all of it.
- It is 18rem tall: a header and six links of an
fz-link-listfit, at the default sizes. For another height, set--fz-expand-card-heighton each one, or on the grid. - In a grid of one column, as on a phone, there is no row of cards to line up with, so each card is as tall as all it holds: none is cut off, and none opens. Without the script, every card is the one height.
- On paper, every card shows all of what it holds.
<div class="fz-auto-grid fz-auto-grid--max-2 fz-auto-grid--wide">
<div class="fz-expand-card">
<section class="fz-card">
<h3 class="fz-card__title">Programs</h3>
<ul class="fz-link-list">
<li><a href="#">Applications</a></li>
<li><a href="#">Interview schedule</a></li>
</ul>
</section>
</div>
<div class="fz-expand-card">
<section class="fz-card">
<h3 class="fz-card__title">Reports</h3>
<ul class="fz-link-list">
<li><a href="#">Enrolment by program</a></li>
<li><a href="#">Attendance summary</a></li>
<li><a href="#">Revenue by month</a></li>
<li><a href="#">Outstanding invoices</a></li>
<li><a href="#">Volunteer hours</a></li>
<li><a href="#">Retention</a></li>
<li><a href="#">Donations by campaign</a></li>
<li><a href="#">Membership renewals</a></li>
</ul>
</section>
</div>
</div>Table
A plain data table: a header row, a line under each row, and rows the row height, which the site's look sets.
| Class | What it does |
|---|---|
fz-table | On a <table>. |
fz-table-- | Every other row shaded. |
fz-table-- | For rows whose cells hold more than a line, such as a title over a description: the cells line up at the top, with space above and below. |
- For a table wider than its container, wrap it in an element with
fz-overflow-x-auto.
<div class="fz-card fz-card--flush fz-overflow-x-auto">
<table class="fz-table">
<thead><tr><th>Student</th><th>School</th><th class="fz-text-end">Grade</th><th>Status</th></tr></thead>
<tbody>
<tr><td>Amira Haddad</td><td>Riverside Public School</td><td class="fz-text-end fz-tabular-nums">7</td><td><span class="fz-badge fz-badge--success">Approved</span></td></tr>
<tr><td>Liam Chen</td><td>Lakeview Middle School</td><td class="fz-text-end fz-tabular-nums">8</td><td><span class="fz-badge fz-badge--warning">Under review</span></td></tr>
</tbody>
</table>
</div>Badge
A short label: a status, a category, a count.
| Class | What it does |
|---|---|
fz-badge | A neutral badge, with a grey dot. |
fz-badge-- | A coloured tint and dot. |
fz-badge-- | No dot. |
fz-badge-- | A circle, for an icon on its own. Every one is the same size, so a column of them lines up. No dot. |
- The colour is in the tint and the dot; the text stays the normal text colour, so it is readable in every theme. The word should say what the status is: don't rely on the colour alone.
- An icon on its own says nothing to someone who cannot see it, or does not know it. Give an icon badge a
title, and the same words inside it in an element withfz-sr-only.
<div class="fz-cluster">
<span class="fz-badge">Draft</span>
<span class="fz-badge fz-badge--info">Submitted</span>
<span class="fz-badge fz-badge--warning">Under review</span>
<span class="fz-badge fz-badge--success">Approved</span>
<span class="fz-badge fz-badge--danger">Rejected</span>
<span class="fz-badge fz-badge--accent fz-badge--plain">12 new</span>
<span class="fz-badge fz-badge--icon fz-badge--warning" title="Featured">★<span class="fz-sr-only">Featured</span></span>
</div>Callout
A message set apart from the content around it: instructions, a warning, the result of an action.
| Class | What it does |
|---|---|
fz-callout | A callout, in the accent colour. |
fz-callout-- | A status callout. |
fz-callout__ | A bold first line. |
- Add
role="status"to a callout that appears because of something the user just did, so screen readers announce it. - A
fz-btn--ghostin a callout, such as a button that dismisses it, hovers in a deeper tint of the callout's colour.
<div class="fz-stack fz-gap-3">
<div class="fz-callout"><p class="fz-callout__title">Before you start</p><p>Have your student number and your school's address ready.</p></div>
<div class="fz-callout fz-callout--success" role="status"><p>Your application was submitted.</p></div>
<div class="fz-callout fz-callout--warning"><p>This entry has not been reviewed yet.</p></div>
<div class="fz-callout fz-callout--danger"><p>The due date has passed.</p></div>
</div>Toolbar
A row with a group at each end, such as a heading and its buttons, wrapping when it runs out of room.
| Class | What it does |
|---|---|
fz-toolbar | The row. |
fz-toolbar__ | The group at the start. |
fz-toolbar__ | The group at the end. |
<div class="fz-toolbar">
<div class="fz-toolbar__start"><h2 class="fz-text-xl fz-font-semibold">Applications</h2><span class="fz-badge fz-badge--plain">48</span></div>
<div class="fz-toolbar__end"><button type="button" class="fz-btn">Export</button><button type="button" class="fz-btn fz-btn--primary">New application</button></div>
</div>Description list
Labelled values, such as an entry's fields in a card. On a <dl>; each <dt> and <dd> pair may be wrapped in a <div>.
| Class | What it does |
|---|---|
fz-dl | Terms and values side by side. |
fz-dl-- | Each term above its value. |
- In a derived value, put the class on a
<div>around the<dl>instead:<div class="fz-dl"><dl>...</dl></div>. A derived value's HTML is filtered before it is shown, and the filter takes the class off a<dl>but leaves it on a<div>.
<div class="fz-switcher">
<dl class="fz-dl">
<dt>Student</dt><dd>Amira Haddad</dd>
<dt>School</dt><dd>Riverside Public School</dd>
<dt>Grade</dt><dd>7</dd>
</dl>
<dl class="fz-dl fz-dl--stacked">
<div><dt>Submitted</dt><dd>September 12, 2026</dd></div>
<div><dt>Status</dt><dd><span class="fz-badge fz-badge--success">Approved</span></dd></div>
</dl>
</div>Empty state
What to show where there is nothing to show yet, and what to do about it.
| Class | What it does |
|---|---|
fz-empty | A centred, outlined area. |
fz-empty__ | Its heading. |
<div class="fz-empty">
<p class="fz-empty__title">No applications yet</p>
<p>They will appear here once students start submitting them.</p>
<button type="button" class="fz-btn fz-btn--primary">Share the form</button>
</div>Bar list
A few things compared by a number: for each, a label, a bar as long as its share, and the figure. For a breakdown by status or by category on a dashboard.
| Class | What it does |
|---|---|
fz-bar-list | The list. |
fz-bar-list-- | Each row has two figures after its bar, such as a count and a percentage. |
fz-bar-list__ | One thing: its label, its bar and its figure. The bar is the accent colour. |
fz-bar-list__ | The bar in a status colour, or grey. |
fz-bar-list__ | What the row is. It can hold an icon or a badge as well as text. |
fz-bar-list__ | The full width a bar could be. |
fz-bar-list__ | The bar. Give it its width as a percentage, in a style attribute. |
fz-bar-list__ | A figure. |
- It is made of
<div>and<span>elements, in this order in each row: label, track with the bar in it, then the figures. - The figure says what the bar shows, so the bar itself needs no text of its own.
- For a colour that is not one of the status colours, such as the steps of a scale, set
--fz-toneon the row. - Work out the percentages in your code. The bar's width is the share of the whole; use the share of the largest one instead to compare the rows with each other.
<div class="fz-bar-list fz-bar-list--two-values">
<div class="fz-bar-list__row fz-bar-list__row--success">
<span class="fz-bar-list__label">Approved</span>
<span class="fz-bar-list__track"><span class="fz-bar-list__bar" style="width: 52%"></span></span>
<span class="fz-bar-list__value">31</span>
<span class="fz-bar-list__value fz-font-normal fz-text-muted">52%</span>
</div>
<div class="fz-bar-list__row fz-bar-list__row--warning">
<span class="fz-bar-list__label">Under review</span>
<span class="fz-bar-list__track"><span class="fz-bar-list__bar" style="width: 20%"></span></span>
<span class="fz-bar-list__value">12</span>
<span class="fz-bar-list__value fz-font-normal fz-text-muted">20%</span>
</div>
<div class="fz-bar-list__row fz-bar-list__row--danger">
<span class="fz-bar-list__label">Rejected</span>
<span class="fz-bar-list__track"><span class="fz-bar-list__bar" style="width: 8%"></span></span>
<span class="fz-bar-list__value">5</span>
<span class="fz-bar-list__value fz-font-normal fz-text-muted">8%</span>
</div>
<div class="fz-bar-list__row fz-bar-list__row--neutral">
<span class="fz-bar-list__label">Draft</span>
<span class="fz-bar-list__track"><span class="fz-bar-list__bar" style="width: 20%"></span></span>
<span class="fz-bar-list__value">12</span>
<span class="fz-bar-list__value fz-font-normal fz-text-muted">20%</span>
</div>
</div>Progress
One bar, as long as how far something has got: a score out of a total, steps done, money raised against a goal.
| Class | What it does |
|---|---|
fz-progress | The track. Give it role="progressbar" and the aria-valuenow, aria-valuemin and aria-valuemax it shows, or put the figure beside it in text. |
fz-progress-- | The bar in a status colour, or grey. It is the accent colour otherwise. |
fz-progress__ | The bar. Give it its width as a percentage, in a style attribute. |
- For several bars side by side, each with its label and figure, use the bar list.
- For a colour that is not one of the status colours, set
--fz-toneon the track.
<div class="fz-stack fz-gap-2" style="max-width: 20rem">
<p><span class="fz-text-2xl fz-font-semibold fz-tabular-nums">$12,480</span> <span class="fz-text-muted">of $20,000 raised</span></p>
<div class="fz-progress fz-progress--success" role="progressbar" aria-valuenow="62" aria-valuemin="0" aria-valuemax="100"><span class="fz-progress__bar" style="width: 62%"></span></div>
</div>Disclosure
Something that opens in place to show more: the detail behind a summary, a list that is usually not needed.
| Class | What it does |
|---|---|
fz-disclosure | On a <details>. Its <summary> is what is clicked, with a chevron at the end, the same as an accordion's, and the rest is what opens. |
fz-disclosure-- | No box of its own: for one that is inside a card. |
- Say in the summary what is inside, and how much of it if that helps: "Rankings (3)".
- Add the
openattribute to a<details>to have it start open. - It grows and shrinks as it opens and closes, unless the person has asked their computer for less motion. Some browsers open and close it at once.
<div class="fz-stack fz-gap-2">
<details class="fz-disclosure">
<summary>Mitigations (2)</summary>
<ul>
<li>Two staff are present at every session.</li>
<li>Sessions are held in rooms with a window in the door.</li>
</ul>
</details>
<details class="fz-disclosure" open>
<summary>Reviews (1)</summary>
<p class="fz-text-muted">Reviewed on September 12, 2026. No changes needed.</p>
</details>
</div>Accordion
A list of things, each a box that opens in place to show more, and that can be put in order by dragging: the sections of a page, the items of a menu.
| Class | What it does |
|---|---|
fz-accordion | On an <ol> or <ul>: the list. |
fz-accordion__ | On each <li>: one box. |
fz-accordion__ | On the <details> in each item. Give every one in the list the same name to have only one open at a time. |
fz-accordion__ | On its <summary>: what is clicked to open and close it, with a chevron at the end. |
fz-accordion__ | A <span> in the summary: what the item is. |
fz-accordion__ | A <span> in the summary, after the title: a little more about it, such as a count. |
fz-accordion__ | A <div> after the summary: what opens. Its children are stacked. |
fz-accordion__ | A <button type="button"> in the item, before its <details>, with an icon in it and an aria-label that names the item: "Move Museum". An item with a handle can be put somewhere else in the list. |
fz-accordion__ | The item being dragged. Added and taken away by Formulize's script, formulize-ui.js; don't add it yourself. |
- An item is dragged by its handle, with a mouse or a finger. The page scrolls when it is dragged near the top or bottom of the window, and Esc while dragging puts it back where it was.
- With the keyboard, the arrow keys move the item with the focused handle up or down one place, and Home and End move it to the top or the bottom.
- An item can only move within its own list, so a list in an item's body can be put in order separately. An item without a handle stays where it is, but the others can move past it.
- The list fires an
fz-accordion-reorderevent, which bubbles, each time an item moves:event.detailhas theitemthat moved, and its place in the list before (from) and after (to), counting from 0. Give each item an attribute such asdata-idto read the new order from. - To have screen readers say where an item has moved to, put the words on the list in
data-fz-moved, with%1$sfor the item's name,%2$sfor its place and%3$sfor how many there are:data-fz-moved="Moved %1$s to position %2$s of %3$s". The name is the item'sfz-accordion__title. Take the words from a language file, so they are in the site's language. - Moving the items needs Formulize's script,
formulize-ui.js. Without it, the items open and close, and stay in order. - It grows and shrinks as it opens and closes, unless the person has asked their computer for less motion. Some browsers open and close it at once.
<ol class="fz-accordion" data-fz-moved="Moved %1$s to position %2$s of %3$s">
<li class="fz-accordion__item" data-id="programs">
<button type="button" class="fz-accordion__handle" aria-label="Move Programs"><svg viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><circle cx="6" cy="4" r="1.2"/><circle cx="10" cy="4" r="1.2"/><circle cx="6" cy="8" r="1.2"/><circle cx="10" cy="8" r="1.2"/><circle cx="6" cy="12" r="1.2"/><circle cx="10" cy="12" r="1.2"/></svg></button>
<details class="fz-accordion__details" name="example-accordion">
<summary class="fz-accordion__summary"><span class="fz-accordion__title">Programs</span><span class="fz-accordion__meta">3 links</span></summary>
<div class="fz-accordion__body">
<ul class="fz-link-list">
<li><a href="#">Applications</a></li>
<li><a href="#">Interview schedule</a></li>
<li><a href="#">Offers</a></li>
</ul>
</div>
</details>
</li>
<li class="fz-accordion__item" data-id="reports">
<button type="button" class="fz-accordion__handle" aria-label="Move Reports"><svg viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><circle cx="6" cy="4" r="1.2"/><circle cx="10" cy="4" r="1.2"/><circle cx="6" cy="8" r="1.2"/><circle cx="10" cy="8" r="1.2"/><circle cx="6" cy="12" r="1.2"/><circle cx="10" cy="12" r="1.2"/></svg></button>
<details class="fz-accordion__details" name="example-accordion">
<summary class="fz-accordion__summary"><span class="fz-accordion__title">Reports</span><span class="fz-accordion__meta">2 links</span></summary>
<div class="fz-accordion__body">
<ul class="fz-link-list">
<li><a href="#">Enrolment by program</a></li>
<li><a href="#">Attendance summary</a></li>
</ul>
</div>
</details>
</li>
<li class="fz-accordion__item" data-id="help">
<button type="button" class="fz-accordion__handle" aria-label="Move Help"><svg viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><circle cx="6" cy="4" r="1.2"/><circle cx="10" cy="4" r="1.2"/><circle cx="6" cy="8" r="1.2"/><circle cx="10" cy="8" r="1.2"/><circle cx="6" cy="12" r="1.2"/><circle cx="10" cy="12" r="1.2"/></svg></button>
<details class="fz-accordion__details" name="example-accordion">
<summary class="fz-accordion__summary"><span class="fz-accordion__title">Help</span><span class="fz-accordion__meta">Link</span></summary>
<div class="fz-accordion__body">
<p class="fz-text-muted">Goes to the help centre, in a new tab.</p>
</div>
</details>
</li>
</ol>Tabs
A row of tabs, each showing one part of a page in place of the others: the overview, the answers and the assessment of one report.
| Class | What it does |
|---|---|
fz-tabs | The row of tabs. Give it role="tablist" and an aria-label. |
fz-tabs__ | One tab: a <button type="button"> with role="tab", aria-controls naming its panel, and aria-selected="true" on the one that is shown and "false" on the others. |
fz-tab-panel | What a tab shows. Give it role="tabpanel" and an id, and the hidden attribute when its tab is not the one selected. |
- Switching tabs takes a few lines of script, kept with the page: when a tab is clicked, set
aria-selectedon each tab andhiddenon each panel. - On paper the tabs are left out and every panel prints, one after the other, so a printed copy has all of it.
- Use tabs for parts of one thing that are read separately. For a choice that filters or changes what a list shows, use buttons with
aria-pressed, or a choice.
<div class="fz-stack fz-gap-4">
<div class="fz-tabs" role="tablist" aria-label="Report">
<button type="button" class="fz-tabs__tab" role="tab" aria-controls="tab-overview" aria-selected="true">Overview</button>
<button type="button" class="fz-tabs__tab" role="tab" aria-controls="tab-interview" aria-selected="false">Interview</button>
<button type="button" class="fz-tabs__tab" role="tab" aria-controls="tab-assessment" aria-selected="false">Assessment</button>
</div>
<div class="fz-tab-panel" id="tab-overview" role="tabpanel">
<p>Met with the program lead on October 2. Enrolment is up on last year.</p>
</div>
<div class="fz-tab-panel" id="tab-interview" role="tabpanel" hidden>
<p>The answers to each interview question.</p>
</div>
<div class="fz-tab-panel" id="tab-assessment" role="tabpanel" hidden>
<p>The rating, and the reasons for it.</p>
</div>
</div>Popover
A panel that floats over the page beside the button that opens it: more about a value, a short list. Nothing on the page moves when it opens.
| Class | What it does |
|---|---|
fz-popover | On an element with the popover attribute and an id. The <button> that opens it has popovertarget set to that id. |
fz-popover__ | A small heading inside it, for each part of what it shows. |
fz-popover__ | On an <hr>: a line between parts. |
- The browser opens and closes it, with no script: it closes when anything else is clicked, or Esc is pressed.
- Pair it with its button by an anchor name, so it opens beside the button:
style="anchor-name: --screens-3"on the button, andstyle="position-anchor: --screens-3"on the popover. Each pair needs a name of its own, starting with two dashes. - It opens under the button, lined up with its start, and moves above it, or across, when there isn't room. Browsers place it there themselves; in one from before they did (Safari before 26, Firefox before 147), Formulize's own script,
formulize-ui.js, does it. - Keep it short, and put nothing in it that has to be seen: it is for the detail behind something already on the page.
<div class="fz-cluster">
<button type="button" class="fz-btn" popovertarget="example-popover" style="anchor-name: --example-popover">3 screens</button>
<div class="fz-popover" id="example-popover" popover style="position-anchor: --example-popover">
<p class="fz-popover__title">Screens set to Events</p>
<ul class="fz-list-none fz-p-0 fz-m-0">
<li>Event registration</li>
<li>Volunteer sign-up</li>
<li>Event check-in</li>
</ul>
<hr class="fz-popover__sep">
<p class="fz-text-muted">A change to Events changes all three.</p>
</div>
</div>Popover panel
A popover that holds a small form, such as a filter: a few choices to make, with buttons at the foot to apply them or not. Its body scrolls when there is more than fits, and its foot stays in view.
| Class | What it does |
|---|---|
fz-popover-- | Beside fz-popover, on the popover. |
fz-popover__ | Optional: what stays at the top while the body scrolls, such as a box to find a choice. |
fz-popover__ | The choices. |
fz-popover__ | The buttons, at the end of the row. |
- Open and pair it as a popover. Clicking elsewhere and Esc close it as they close any popover, so treat that as Cancel: listen for its
toggleevent, and put back anything the panel changed. - It can be wider than a popover usually is, up to the width of the window less a margin, for a form that needs the room. Give it a
min-widthfor that. - The list filters for checkboxes and date ranges are panels (
include/js/filterpopovers.js).
<div class="fz-cluster">
<button type="button" class="fz-btn" popovertarget="example-panel" style="anchor-name: --example-panel">Status: Any</button>
<div class="fz-popover fz-popover--panel" id="example-panel" popover style="position-anchor: --example-panel; min-width: 16rem">
<div class="fz-popover__body">
<div class="fz-choice-group">
<label class="fz-choice"><input type="checkbox" class="fz-checkbox"> Draft</label>
<label class="fz-choice"><input type="checkbox" class="fz-checkbox" checked> Submitted</label>
<label class="fz-choice"><input type="checkbox" class="fz-checkbox"> Approved</label>
</div>
</div>
<div class="fz-popover__foot">
<button type="button" class="fz-btn fz-btn--sm" popovertarget="example-panel" popovertargetaction="hide">Cancel</button>
<button type="button" class="fz-btn fz-btn--sm fz-btn--primary">Apply</button>
</div>
</div>
</div>Menu
A list of actions in a popover, opened by a button: the less common things that can be done to one item.
| Class | What it does |
|---|---|
fz-menu | Beside fz-popover, on the popover. |
fz-menu__ | One action: a <button type="button">, or an <a> for going somewhere. |
fz-menu__ | A destructive action, such as delete. |
fz-menu__ | A line under an item's name that says more about it, in a <span> inside the item. |
fz-menu__ | An icon before an item's name: a <span> around an <svg>, first in the item. The name and its note line up beside it. |
fz-menu__ | On an <hr>: a line between groups of items. |
- Open and pair it as a popover. Tab moves between the items.
- An item can open a dialog with
commandforandcommand="show-modal"; the menu closes as the dialog opens. An item that does something on the page needs a line of script, which closes the menu withhidePopover()too. - A disabled item, or one with
aria-disabled="true", is faded and can't be clicked. - The item that is in effect, such as the view a list is showing, has
aria-current="true", and is shown selected. - A group of items can have a small heading: an
fz-popover__title, which lines up with the items' names. Put anfz-menu__sepbetween groups. - Lyris's list screens use menus for their view switcher and More actions. Formulize's own list buttons,
<input type="button" class="formulize_button">, are made into items there by Lyris's own rules.
<div class="fz-cluster">
<button type="button" class="fz-btn" popovertarget="example-menu" style="anchor-name: --example-menu">Edit</button>
<div class="fz-popover fz-menu" id="example-menu" popover style="position-anchor: --example-menu">
<button type="button" class="fz-menu__item"><span class="fz-menu__icon" aria-hidden="true"><svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"><path d="M10.5 2.5l3 3L6 13H3v-3z"/></svg></span>Simple editor<span class="fz-menu__note">Logo, colours, fonts, page width and size</span></button>
<button type="button" class="fz-menu__item"><span class="fz-menu__icon" aria-hidden="true"><svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"><path d="M3 2.5l9.5 4-4 1.5-1.5 4z"/></svg></span>Advanced editor<span class="fz-menu__note">Every part, one at a time</span></button>
<hr class="fz-menu__sep">
<button type="button" class="fz-menu__item">Duplicate</button>
<button type="button" class="fz-menu__item fz-menu__item--danger">Delete</button>
</div>
</div>Dialog
A question or a short form over the page, which waits until it is answered: making something, confirming a deletion.
| Class | What it does |
|---|---|
fz-dialog | On a <dialog> with an id. The <button> that opens it has commandfor set to that id and command="show-modal". |
fz-dialog-- | Wider, for a form with more in it. |
fz-dialog__ | The top: its title, and anything beside it. |
fz-dialog__ | The title: an <h2>. Give the dialog aria-labelledby with its id. |
fz-dialog__ | What it says or asks: text, fields. Its children are stacked. |
fz-dialog__ | Its buttons, at the end, with the main one last. It stays in view if the dialog is long enough to scroll. |
- The browser opens and closes it, with no script of yours. A button with
commandforandcommand="close"closes it, and so does Esc. In a browser from beforecommandfor(Safari before 26.2, Firefox before 144), Formulize's own script,formulize-ui.js, does what those buttons ask. Addclosedby="any"to the<dialog>to have a click outside it close it too, in browsers that do that. - The page under it can't be scrolled or clicked while it is open, and when it closes, the keyboard is back on the button that opened it.
- Put the header, body and footer in a
<form method="dialog">and its submit button closes the dialog, with the button'svalueas the dialog'sreturnValue. For a form that is sent to the server, use an ordinary<form>instead. - Say what the main button does: "Delete look", not "OK".
<div class="fz-cluster">
<button type="button" class="fz-btn fz-btn--danger" commandfor="example-dialog" command="show-modal">Delete Events…</button>
<dialog class="fz-dialog" id="example-dialog" aria-labelledby="example-dialog-title">
<form method="dialog">
<div class="fz-dialog__header">
<h2 class="fz-dialog__title" id="example-dialog-title">Delete Events?</h2>
</div>
<div class="fz-dialog__body">
<p>These screens use Events, and will use the site look instead:</p>
<ul>
<li>Event registration</li>
<li>Volunteer sign-up</li>
</ul>
<p class="fz-text-muted">This can't be undone.</p>
</div>
<div class="fz-dialog__footer">
<button type="button" class="fz-btn" commandfor="example-dialog" command="close">Cancel</button>
<button type="submit" class="fz-btn fz-btn--danger" value="delete">Delete look</button>
</div>
</form>
</dialog>
</div>Tree
A table whose rows are nested under other rows, with lines joining each row to the one it is under: things based on other things, parts of a whole.
| Class | What it does |
|---|---|
fz-tree | Beside fz-table, on the <table>. Its rows have no lines between them, and the one the pointer is on is shaded. One line of text a row. |
fz-tree__ | The first cell of each row, with style="--fz-depth: N": 0 for a row at the top, 1 for a row under it, and so on. |
fz-tree__ | An empty <span> in the cell: a line straight down through the row, for a row above it with a later row next to it. One for each such row, with --fz-level set to that row's depth less one. |
fz-tree__ | The line into the row, from the row it is under. --fz-level is the row's depth less one. Every row but the top ones has one. |
fz-tree__ | The line down from the row to the first row under it. --fz-level is the row's depth. Only on a row with rows under it. |
- The lines are worked out from the rows, so they are usually written by whatever writes the rows: a loop in a template, or the code that builds the page.
- A row that is not the last one under its row has a straight
fz-tree__linebeside its elbow, at the same level, to carry the line on to the next one. - For a tree wider than its container, wrap it in an element with
fz-overflow-x-auto, as for any table.
<div class="fz-card fz-card--flush fz-overflow-x-auto">
<table class="fz-table fz-tree">
<thead><tr><th>Look</th><th>Used by</th></tr></thead>
<tbody>
<tr>
<td class="fz-tree__cell" style="--fz-depth: 0"><span class="fz-tree__line fz-tree__line--stem" style="--fz-level: 0"></span>Default</td>
<td>The site</td>
</tr>
<tr>
<td class="fz-tree__cell" style="--fz-depth: 1"><span class="fz-tree__line fz-tree__line--elbow" style="--fz-level: 0"></span><span class="fz-tree__line" style="--fz-level: 0"></span><span class="fz-tree__line fz-tree__line--stem" style="--fz-level: 1"></span>Events</td>
<td>3 screens</td>
</tr>
<tr>
<td class="fz-tree__cell" style="--fz-depth: 2"><span class="fz-tree__line" style="--fz-level: 0"></span><span class="fz-tree__line fz-tree__line--elbow" style="--fz-level: 1"></span>Events, compact</td>
<td>2 screens</td>
</tr>
<tr>
<td class="fz-tree__cell" style="--fz-depth: 1"><span class="fz-tree__line fz-tree__line--elbow" style="--fz-level: 0"></span>Reports</td>
<td>2 screens</td>
</tr>
<tr>
<td class="fz-tree__cell" style="--fz-depth: 0">Partner portal</td>
<td>1 screen</td>
</tr>
</tbody>
</table>
</div>Embed
Something from elsewhere shown in the page: a map, a video, another site's page. It has a shape of its own, so the page doesn't jump when what is in it arrives.
| Class | What it does |
|---|---|
fz-embed | Around an <iframe>, <video> or <img>, which fills it. Wide: 16 by 9. |
fz-embed-- | Square. |
- Give an
<iframe>atitlethat says what it shows. - It is as wide as the space it is in. To limit it, put it in a column of a layout class, or give it a
max-widthin a style attribute.
<div class="fz-embed" style="max-width: 24rem">
<img src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 9'%3E%3Crect width='16' height='9' fill='%23d1d1cb'/%3E%3C/svg%3E" alt="A grey rectangle, standing in for a map">
</div>Prose
Running text that someone wrote: an article, instructions, an agreement, the contents of a rich text field, a reply from the AI assistant. Its paragraphs, headings, lists, code and tables are sized and spaced for reading.
| Class | What it does |
|---|---|
fz-prose | On the element around the text. |
- The elements inside need no classes: write ordinary
<p>,<h2>,<ul>,<blockquote>,<code>,<pre>and<table>. That makes it the way to show text that came from an editor, and to give text headings and lists in a derived value, where the elements inside cannot keep classes of their own. - A code block (
<pre>) and a table wider than the text scroll sideways, rather than making the page wider. - It is as wide as the space it is in. Long lines are hard to read, so put it in
fz-container fz-container--narrow, or in a column. - It is for text. Lay out a page with the layout classes, not with this.
<div class="fz-prose">
<h2>Before the first session</h2>
<p>Thank you for hosting a workshop. This page sets out what we bring, and what we ask of you.</p>
<h3>We will bring</h3>
<ul>
<li>All the materials for each activity</li>
<li>Two instructors, who arrive 30 minutes early to set up</li>
</ul>
<h3>We ask that you</h3>
<ol>
<li>Have a room with tables and a sink nearby</li>
<li>Tell us about any allergies in the group</li>
</ol>
<blockquote>A teacher stays in the room for the whole session.</blockquote>
<h3>Times</h3>
<table>
<thead><tr><th>Session</th><th>Arrive by</th></tr></thead>
<tbody><tr><td>Morning</td><td>8:30am</td></tr><tr><td>Afternoon</td><td>12:30pm</td></tr></tbody>
</table>
<p>Book through the <code>workshops</code> form.</p>
</div>Code block
Code, data or a log shown on its own: an example to copy, the response from a web service, the output of a script.
| Class | What it does |
|---|---|
fz-code-block | On a <pre>: monospaced, its lines kept as they were written, scrolling sideways when one is too long. |
fz-code-block-- | Long lines wrap instead, for data such as JSON, where a line can be very long. |
fz-code | On a <code> that is not in fz-prose: a short piece of code in a line of text or in a table cell, such as a search term or an element handle. It looks like the <code> in fz-prose. |
- For code in running text, such as instructions with a command in them, use
fz-prose, which styles the<pre>and<code>inside it. - To cap the height, set
--fz-code-block-max-heighton it, in a style attribute: it scrolls inside that height. - Escape what goes inside it, with
htmlspecialchars()in PHP, so the code shows as text.
<div class="fz-stack fz-gap-3">
<pre class="fz-code-block"><code><div class="fz-card">
<h3 class="fz-card__title">Robotics club</h3>
</div></code></pre>
<pre class="fz-code-block fz-code-block--wrap" style="--fz-code-block-max-height: 6rem">{ "form_id": 12, "title": "Applications", "elements": [ { "handle": "applications_student", "type": "text" }, { "handle": "applications_school", "type": "text" }, { "handle": "applications_status", "type": "radio" } ] }</pre>
<p>Type <code class="fz-code">>=2026-09-01</code> in the <code class="fz-code">applications_date</code> column.</p>
</div>Matrix
A grid of cells, each coloured by what it stands for: a risk matrix, a heat map, a chart of what is free and what is taken.
| Class | What it does |
|---|---|
fz-matrix | On a <table>. Its columns are all the same width. |
fz-matrix__ | A cell: on a <span> inside the <td>, or on a <button> there when the cell can be chosen. Square, and grey. |
fz-matrix__ | A cell in a status colour. |
fz-matrix__ | The cell that is chosen, or the one a value falls in: outlined. |
fz-matrix__ | Faded: a cell that is beside the point while others are being looked at. |
- Give the rows and columns their headings with
<th>, and say in each cell what it stands for: the colour alone is not enough. - The colour is a tint, and the text stays the normal text colour, as in a badge.
- For colours that are not the status colours, such as the steps of a scale, set
--fz-toneon the cell.
<table class="fz-matrix" style="max-width: 24rem">
<thead>
<tr><td></td><th scope="col">Minor</th><th scope="col">Moderate</th><th scope="col">Major</th></tr>
</thead>
<tbody>
<tr>
<th scope="row">Unlikely</th>
<td><span class="fz-matrix__cell fz-matrix__cell--success">Low</span></td>
<td><span class="fz-matrix__cell fz-matrix__cell--success">Low</span></td>
<td><span class="fz-matrix__cell fz-matrix__cell--warning">Medium</span></td>
</tr>
<tr>
<th scope="row">Possible</th>
<td><span class="fz-matrix__cell fz-matrix__cell--success">Low</span></td>
<td><span class="fz-matrix__cell fz-matrix__cell--warning fz-matrix__cell--selected">Medium</span></td>
<td><span class="fz-matrix__cell fz-matrix__cell--danger">High</span></td>
</tr>
<tr>
<th scope="row">Likely</th>
<td><span class="fz-matrix__cell fz-matrix__cell--warning">Medium</span></td>
<td><span class="fz-matrix__cell fz-matrix__cell--danger">High</span></td>
<td><span class="fz-matrix__cell fz-matrix__cell--danger">High</span></td>
</tr>
</tbody>
</table>