SideBar
When to use it
Section titled “When to use it”- On every back office page, fixed on the left at full height, with header type=backoffice to its right.
- Mark the page you are on as active, and only that one: the app currently always marks Dashboard active, which needs fixing.
- Keep the item order the same on every page, so people find things by position.
3 more lines in use_when in src/components/SideBar/SideBar.intent.json (items 4 to 6) are Figma’s Best Practice lines, word for word. They are listed once, under “Best practice” below.
Where it goes
Section titled “Where it goes”- On the left of a back office page, with header type=backoffice to its right (the BackOfficePage story).
When not to use it
Section titled “When not to use it”- On the guest website or app: use header type=web or type=app instead.
Instead: Header - For actions such as “Export” or “Add rate”: put them in the page, under the title.
The Figma page names no alternative. - For more than 12 items: group them, or move rare ones into Settings.
The Figma page names no alternative.
Open item: no alternative named for items 2 and 3. Those items have an empty instead in SideBar.intent.json. The Figma page names no alternative: it says “put them in the page, under the title” and “group them, or move rare ones into Settings”, and neither names a Horizon component. This page shows “The Figma page names no alternative” and does not fill the gap. Item 3 also says “group them”, but SideBar has no group or submenu (see below).
From the release review, under “Warnings”, as written:
dont_use_when[1] and [2] have empty instead (C2). Figma gives no named component for either; the real alternatives are “put them in the page, under the title” and “group them, or move rare ones into Settings”, neither a component. Owner: component-intent.
Item 2 is Figma’s own wording, and it reads as a bug note about the app, not a design rule. It is shown above verbatim: “Mark the page you are on as active, and only that one: the app currently always marks Dashboard active, which needs fixing.” The rule in it is to mark the page you are on, and only that one. The clause after the colon describes a fault in an application, not in this component, and this page does not rewrite it. The decisions ruling lists it under “Not ruled” as a bug note. In the code, current is a boolean on each item (SideBar.tsx:14); nothing in SideBar.tsx checks that only one item is current.
From the release review, under “Warnings”, as written:
use_when[1] (“Mark the page you are on as active, and only that one: the app currently always marks Dashboard active, which needs fixing.”) carries a bug note about the app inside a design rule. The ruling lists it as a bug note, not a design rule. Owner: the designer or component-intent, to reword; not edited here.
From the 2026-10-07 ruling in decisions.md, under “Not ruled”, as written:
The Usage line “the app currently always marks Dashboard active, which needs fixing”, which reads as a bug note and not a design rule.
Placement repeats the first use line. placement in SideBar.intent.json has one entry, which restates item 1 of use_when with the story named. It adds no separate placement rule.
From the release review, under “Warnings”, as written:
placement has one entry, which repeats the first use_when.
Not built
Section titled “Not built”Figma draws none of these, and SideBar.tsx and SideBar.css at b9ffb76 build none of them:
- a collapse state or toggle
- a small-screen layout
- arrow-key navigation (Tab, Shift+Tab and Enter work because each item is a native link)
- groups or submenus (the Figma Usage line says to group when there are more than 12 items)
- disabled items (the Figma best practice says to hide items the role cannot open instead)
- a skip link
- a per-item destination:
hrefis optional and falls back to"#"(SideBar.tsx:76), so an item with nohrefgoes nowhere - the cap of 12 items: any length of
itemsis rendered - the rule that only one item is active: every item with
currentset is marked
The 2026-10-07 ruling names the first six as “Anything Figma does not draw and the component does not build” and leaves them to a human. It reads, as written: “Anything Figma does not draw and the component does not build: a collapse state, small-screen layout, arrow-key navigation, groups, disabled items, a skip link.”
Best practice
Section titled “Best practice”From the Figma documentation page (usage node 247:520), as written. SideBar.intent.json carries these same lines as items 4 to 6 of use_when, word for word; they are listed here once.
- Use short labels of one to three words, such as “Team and roles”.
- Show which organisation and how many properties the admin is looking at in the footer.
- Hide items the person’s role can’t open, instead of showing them disabled.
What each variant is for
Section titled “What each variant is for”| Property | Value | What it is for |
|---|---|---|
state |
default |
Figma doesn’t say. |
state |
hover |
lighter |
state |
active |
the current page |
Open item: nothing for default. variant_intent.default is empty in SideBar.intent.json because Figma publishes no description of the default item. hover and active say what they look like (“lighter”, “the current page”), not when to choose them. This page does not write one.
From the release review, under “Warnings”, as written:
variant_intent.default is “” (a recorded Figma gap: Figma publishes no description of the default item). hover is “lighter” and active is “the current page”; neither says when to choose it, only what it looks like. Owner: component-intent.
active is not a value of the code’s union. SideBarItemState is "default" \| "hover" (SideBar.tsx:6). Figma’s state=active is carried by the boolean current on an item (SideBar.tsx:14), which also sets aria-current="page". variant_intent has the key active because Figma publishes that state, so the table above has one key more than the union. The review records this as a judgement call a human can overrule.
From the release review, under “Warnings”, as written:
C5 strict reading (see C5): active is one key beyond the union SideBarItemState.
Accessibility
Section titled “Accessibility”- The items sit in a native <nav> landmark, named by navLabel (default “Main”).
src/components/SideBar/SideBar.tsx:65 - The items are a list (<ul>, <li>), so a screen reader announces how many there are.
src/components/SideBar/SideBar.tsx:66 - Each item is Horizon’s Link, a native <a href>, so Tab, Shift+Tab and Enter work with no extra script.
src/components/SideBar/SideBar.tsx:69 - The current page is marked aria-current=“page”, not by colour alone.
src/components/SideBar/SideBar.tsx:77 - The logo mark is decorative (empty alt), since the title beside it names the app.
src/components/SideBar/SideBar.tsx:62 - The footer divider is hidden from assistive technology.
src/components/SideBar/SideBar.tsx:85 - A keyboard focus ring (color/border/focus, 2px) is drawn inside the item row.
src/components/SideBar/SideBar.css:87
Open items
Section titled “Open items”They are open items, not waived.
Open accessibility problem: the focus ring has low contrast. The keyboard focus ring (SideBar.css:86-89: a 2px --color-border-focus outline, drawn inside the row) is not in Figma. The engineer added it. It is true that it exists, and the last fact above says so, but it does not meet the 3:1 minimum of WCAG 2.1 success criterion 1.4.11 on the two surfaces a focused item sits on. The reviewer computed 2.16:1 on the panel and 1.60:1 on the active fill, and the figures were checked again for this page against the built token values (#1d44ba on #161925, #1d44ba on #162d69); only on the hover fill does it reach 7.76:1. This is not a feature and no ruling covers it: the ruling’s “Not ruled” line says its contrast was never checked. It is owned first by the designer, for a ring colour that works on the inverse panel, and then by the engineer.
From the release review, under “Warnings”, as written:
Focus ring contrast is low (computed, not browser-tested). SideBar.css:87-88 draws –color-border-focus (#1d44ba) at 2px. From the built token values: 2.16:1 against the panel (#161925) and 1.60:1 against the active fill (#162d69), both under the 3:1 WCAG 2.1 SC 1.4.11 minimum for a focus indicator; it reaches 7.76:1 only on the hover fill. The ring is not in Figma (the engineer added it) and the ruling’s “Not ruled” line records that its contrast was never checked, so no ruling covers it. It is not a gate in this skill, so it is a warning. Owner: the designer, for a ring colour that works on the inverse panel, then the engineer.
Not tested. Real Tab order, a real mouse hover, screen-reader output and the dark theme were never tested by anyone: QA had no real input, and the release review had no browser or input device. The facts above cite the code that should produce them; they are not evidence of the behaviour.
From the release review, under “Warnings”, as written:
QA gaps, not credited. QA did not test real Tab order, the focus ring’s contrast, real mouse hover, screen-reader output or the dark theme (no real input available). None is claimed as passed. This review could not run them either (no browser, no input device). Marked Not checked.
Composition
Section titled “Composition”The stories compose SideBar with: Header.
From the code. SideBar.tsx is built from Logo and Link: it imports them (SideBar.tsx:4, SideBar.tsx:3), renders <Logo type="mark" alt=""> in the header (SideBar.tsx:62) and one <Link> per item (SideBar.tsx:69), and the registry’s Composes column records both. pairs_with lists Header, which is a pairing and not a part: the BackOfficePage story places <Header type="backoffice"> to the right of the sidebar (SideBar.stories.tsx:101).
From the release review, under “Warnings”, as written:
Composes verified in code. The board lists Logo and Link. SideBar.tsx:3-4 imports Link and Logo; :62 renders Logo type=“mark”, :69 renders Link per item. Both match the board; nothing else is imported from src/components.
From the release review, under “Warnings”, as written:
pairs_with: [“Header”] is supported by the BackOfficePage story (SideBar.stories.tsx:95-105, Header type=“backoffice”) and by Header.intent.json naming the Sidebar. Logo and Link, which SideBar composes, are not in pairs_with; composed parts are not pairings, so this is not a finding.
What this version promises
Section titled “What this version promises”From Versioning (VERSIONING.md at b9ffb76):
0.3.0 adds six components on top of 0.2.1: Calendar, Card, Form, Modal, SideBar and Table. It contains twenty-three components, each exported from the package root with its props type: Avatar, Breadcrumbs, Button, ButtonGroup, Calendar, Card, Checkbox, Chip, Dropdown, File, Form, Header, Image, Link, Logo, Modal, ProgressBar, RadioCard, SearchBar, SideBar, Stepper, Table, Toggle. Textfield is exported from the package root as well, with TextfieldProps and TextfieldState, and is public like the others (see decisions.md, 2026-10-07, Textfield). It commits you to their props, prop values and defaults, their hz- class names, the tokens in tokens.css and the three entry points (., ./styles.css, ./tokens.css). Everything in 0.3.0 beyond 0.2.1 is an addition: nothing from 0.2.1 was changed, removed or renamed. A change that breaks any of these on 0.x bumps the version to 0.4.0.
Two things about this release are worth knowing:
- Form, Modal and Table each passed release review with their literal sizes covered by a ruling in decisions.md (Card, SideBar and Calendar have their own), because no size tokens exist for them. Those literals are accepted until the designer adds matching tokens, so a later change to use tokens at the same rendered sizes would be a patch, not a breaking change.
- Dark theme is not verified for Table, and its warning tag has low contrast. The Table docs page says so. Neither is a breaking-change risk, but a fix that changes a token’s value is a patch and is listed in the changelog.
Stories
Section titled “Stories”Default
Section titled “Default”Without Footer
Section titled “Without Footer”Current Page
Section titled “Current Page”Item Hover
Section titled “Item Hover”Long Label And Footer
Section titled “Long Label And Footer”Few Items
Section titled “Few Items”Interactive
Section titled “Interactive”Back Office Page
Section titled “Back Office Page”Import
Section titled “Import”import { SideBar } from "@layerbasesystemic/horizon-design-system";import type { SideBarProps, SideBarItem, SideBarItemState } from "@layerbasesystemic/horizon-design-system";@layerbasesystemic/horizon-design-system/tokens.css and @layerbasesystemic/horizon-design-system/styles.css must be loaded too; see Developing.
SideBar.tsx is built from Logo: it imports it (SideBar.tsx:4) and renders <Logo> (SideBar.tsx:62). The registry’s Composes column for SideBar lists Logo.
SideBar.tsx is built from Link: it imports it (SideBar.tsx:3) and renders <Link> (SideBar.tsx:69). The registry’s Composes column for SideBar lists Link.
| Prop | Type | Default | Description |
|---|---|---|---|
title |
string |
"HS Admin" |
Figma Title (default “HS Admin”). |
organisation |
string |
"Casa do Bairro group" |
Figma Organisation (default “Casa do Bairro group”). |
detail |
string |
"4 properties · Lisbon" |
Figma Detail (default “4 properties · Lisbon”). |
showFooter |
boolean |
true |
Figma ShowFooter (default true). |
items |
SideBarItem[] |
DEFAULT_ITEMS |
Figma draws up to 12 nav items (_sidebar-item). Defaults to the 12 drawn, Dashboard current. |
navLabel |
string |
"Main" |
Not a Figma property. Accessible name of the navigation landmark. |
SideBarProps also extends Omit<HTMLAttributes<HTMLDivElement>, "title">, so native attributes pass through to the element (SideBar.tsx:19).
Union types
Section titled “Union types”SideBarItemState: default, hover
Tokens it needs
Section titled “Tokens it needs”Every CSS custom property SideBar.css reads, with its value in the token build at b9ffb76.
| Token | Light | Dark |
|---|---|---|
--border-width-md |
2px |
same as light |
--border-width-sm |
1px |
same as light |
--color-bg-inverse |
#161925 |
#f9fafb |
--color-border-focus |
#1d44ba |
#6692f8 |
--color-primary-foreground |
#162d69 |
#eff3ff |
--color-text-inverse |
#f9fafb |
#161925 |
--color-text-inverse-secondary |
#d1d5db |
#6a7180 |
--fontfamily-body |
Inter |
same as light |
--fontsize-2xl |
18px |
same as light |
--fontsize-lg |
13px |
same as light |
--fontsize-sm |
11px |
same as light |
--fontsize-xs |
10px |
same as light |
--lineheight-2xl |
26px |
same as light |
--lineheight-lg |
20px |
same as light |
--lineheight-sm |
16px |
same as light |
--lineheight-xs |
16px |
same as light |
--radius-xs |
2px |
same as light |
--spacing-lg |
16px |
same as light |
--spacing-md |
12px |
same as light |
--spacing-xl |
20px |
same as light |
--spacing-xs |
4px |
same as light |
This matches required_tokens in SideBar.intent.json exactly.
Figma node
Section titled “Figma node”Page Sidebar (57:1651), documentation frame ❖ sidebar (247:18), component sidebar (246:11). The file is shared with the team only, so the frame and the link ask anyone outside it to sign in.
The page also holds _sidebar-item (246:10), which Figma describes as: “Internal part of sidebar (not for direct use). One nav item: default, hover (lighter) or active (the current page).” Its Figma variants: state=default (246:4), state=hover (246:6), state=active (246:8).
Variant matrix
Section titled “Variant matrix”state (3) = 3 cells. The matrix is the item part _sidebar-item (set 246:10): state default (246:4), hover (246:6) and active (246:8), each 196x32. The sidebar itself (component 246:11, 220x1000) is not a variant set: it has 12 nav item instances, a divider and a footer, and the boolean property ShowFooter (true or false, specimen board 233:14320). Figma draws no focus, pressed, disabled, collapsed or small-screen state. The canvas also holds the example ‘back office page’ (247:21: sidebar, header type=backoffice and a calendar), and the documentation frame for the item part is 233:14406. In the stories the item state is not a single story argument: it is set through the items array. ItemHover pins state hover on the Reservations item, and Default (Dashboard) and CurrentPage (Calendar) carry state active through the current boolean, so a row below that reads ‘no story’ means no story sets a state arg, not that the state has no story.
state |
Figma node | Story |
|---|---|---|
default |
246:4 |
Default |
hover |
246:6 |
no story |
active |
246:8 |
no story |
Themes
Section titled “Themes”The sidebar documentation frame renders every instance in one theme. It has no separate light and dark frames. The panel is the inverse (dark) surface, color/bg/inverse #161925.
The token build defines 179 tokens for light and redeclares 50 for dark; the Code tab shows SideBar’s tokens in both.
Values Figma never bound
Section titled “Values Figma never bound”Values on the Figma node that aren’t bound to a variable, and what SideBar.css at b9ffb76 does with each.
| Layer | Property | Figma value | In the code |
|---|---|---|---|
| sidebar (246:11) | width | 220px |
width: 220px; |
| sidebar (246:11) | height | 1000px |
height: 100%; |
| item, every state (246:4, 246:6, 246:8) | height | 32px |
--hz-sidebar-item-height: 32px; |
| Footer (246:46), between Organisation and Detail | gap | 2px |
gap: 2px; |
| Divider (246:45) | fill opacity | color/text/inverse at a partial opacity the design tools do not expose |
background: color-mix(in srgb, var(--color-text-inverse) 12%, transparent); |
Figma variables against the token build
Section titled “Figma variables against the token build”| Figma variable | Figma value | Token in the build | Built light value | Agrees |
|---|---|---|---|---|
--color-text-inverse |
#f9fafb |
--color-text-inverse |
#f9fafb |
yes |
--fontSize-2xl |
18 |
--fontsize-2xl |
18px |
yes |
--fontWeight-bold |
Bold |
no such token | — | no token |
--fontFamily-body |
Inter |
--fontfamily-body |
Inter |
yes |
--lineHeight-2xl |
26 |
--lineheight-2xl |
26px |
yes |
--spacing-md |
12 |
--spacing-md |
12px |
yes |
--fontSize-lg |
13 |
--fontsize-lg |
13px |
yes |
--fontWeight-medium |
Medium |
no such token | — | no token |
--lineHeight-lg |
20 |
--lineheight-lg |
20px |
yes |
--radius-xs |
2 |
--radius-xs |
2px |
yes |
--color-primary-foreground |
#162d69 |
--color-primary-foreground |
#162d69 |
yes |
--color-text-inverse-secondary |
#d1d5db |
--color-text-inverse-secondary |
#d1d5db |
yes |
--fontWeight-regular |
Regular |
no such token | — | no token |
--spacing-xs |
4 |
--spacing-xs |
4px |
yes |
--fontSize-sm |
11 |
--fontsize-sm |
11px |
yes |
--lineHeight-sm |
16 |
--lineheight-sm |
16px |
yes |
--fontSize-xs |
10 |
--fontsize-xs |
10px |
yes |
--lineHeight-xs |
16 |
--lineheight-xs |
16px |
yes |
--spacing-lg |
16 |
--spacing-lg |
16px |
yes |
--spacing-xl |
20 |
--spacing-xl |
20px |
yes |
--color-bg-inverse |
#161925 |
--color-bg-inverse |
#161925 |
yes |
--fontWeight-bold, --fontWeight-medium, --fontWeight-regular are bound in Figma but the token build has no token of that name.
Design gaps recorded against it
Section titled “Design gaps recorded against it”Divider alpha: unconfirmed. The divider is color-mix(in srgb, var(--color-text-inverse) 12%, transparent) (SideBar.css:95). Figma node 246:45 fills it with color/text/inverse at an opacity the design tools do not expose, so the 12% is an engineer’s estimate and is not shown here as matching Figma. The user accepted it as a design decision. From the 2026-10-07 ruling in decisions.md, as written:
The 12% is the engineer’s estimate, taken by sampling a rendered pixel (6% to 12%); Figma’s real opacity was never read, so it is unconfirmed whether 12% matches it. The user accepted the built divider as a design decision (2026-10-07).
From the release review, under “Warnings”, as written:
Divider alpha 12% is unconfirmed (SideBar.css:95). An engineer’s estimate from a sampled pixel (6% to 12%); Figma’s real opacity was never read and is still not exposed by the design tools (checked on 246:45 in this review). The user accepted it as a design decision. It is not described here as matching Figma. Owner: the designer, to document or bind the opacity (then add an alpha token and re-test); until then the user’s decision stands.
Hover label: the build differs from Figma. Figma 246:6 fills the hovered row with color/text/inverse (#f9fafb) and 246:7 colours its label color/text/inverse too, so as designed the label is invisible. The build sets color: var(--color-bg-inverse) (#161925) at SideBar.css:74, 16.75:1 on the fill. The user accepted that as a design decision and Figma was not changed, so the node still draws the invisible label. From the 2026-10-07 ruling in decisions.md, as written:
The hover label colour stays –color-bg-inverse (#161925) on the –color-text-inverse (#f9fafb) fill, set at SideBar.css:74, against Figma’s #f9fafb label. The user accepted this as a design decision (2026-10-07); Figma was not changed, so nodes 246:6 and 246:7 still draw the invisible label. The QA report (reports/SideBar/qa-report.md, round 2) records both decisions.
From the release review, under “Warnings”, as written:
Hover label colour deviates from Figma (SideBar.css:74). Built #161925 (–color-bg-inverse) on #f9fafb; Figma 246:6/246:7 draw #f9fafb on #f9fafb. Accepted by the user; Figma was not changed. The two Staging Testing rows moved Failed to Passed on that basis. Per the ruling it is not counted against the verdict. Owner: the designer, to fix the hover label in Figma, after which the state must be re-tested against the node.
Focus ring: not in Figma. Figma draws no focus state. The ring at SideBar.css:86-89 was added by the engineer and its contrast is an open accessibility problem, described on the Usage tab under Accessibility. The owner is the designer first, then the engineer.
Font. From the release review, under “Warnings”, as written:
Inter is not loaded in Storybook, and the repo ships no font loading (the QA report’s check “Font loaded” is “Not confirmed”). The component sets font-family: var(–fontfamily-body), sans-serif (line 15). This affects every component; it is not specific to SideBar. Owner: a human decision on font delivery.
- 2026-10-07 · SideBar sizes with no token, and the accepted divider and hover label (decisions.md). These literals in src/components/SideBar/SideBar.css are accepted, because they are what the Figma nodes specify, until the designer adds matching size and alpha tokens. Accepted values:
220px(width,.hz-sidebar, line 11);32px(–hz-sidebar-item-height, used for the item height and, through calc, its vertical padding,.hz-sidebar, line 5);2px(gap,.hz-sidebar__footer, line 102);12%(alpha in color-mix(in srgb, var(–color-text-inverse) 12%, transparent),.hz-sidebar__divider, line 95). Not ruled: Any other literal value, including a var() fallback. These values in any other component. A change to these values: a different number needs a new ruling or a token. The item padding derived from –hz-sidebar-item-height and –lineheight-lg, the unitless font weights 400, 500 and 700, and the responsive limits 100% and height: 100%, which need no ruling. The focus ring and the nav’s overflow-y: auto, which Figma does not draw and the engineer added; the ring’s contrast on the dark panel was never checked. Anything Figma does not draw and the component does not build: a collapse state, small-screen layout, arrow-key navigation, groups, disabled items, a skip link. The Usage line “the app currently always marks Dashboard active, which needs fixing”, which reads as a bug note and not a design rule.
Every commit to src/components/SideBar up to b9ffb76, newest first, with the published version that carries it.
| Commit | Date | Version | Change |
|---|---|---|---|
2ed2679 |
2026-10-07 | 0.3.0 | SideBar: build from Figma 57:1651 (nav, 12 items, optional footer) |