Header
When to use it
Section titled “When to use it”- Use type web at the top of every page of the guest website, with the current section as the first, darker link.
- Use type app at the top of each app screen below the status bar: back on the left, the screen name in the centre, one text action on the right when the screen has one, such as “Save” or “Mark read”.
- Use type backoffice above the content of each back office page, next to the Sidebar, with the page name and search.
- Keep the app title short (one or two words) so it stays centred and never truncates.
- Turn ShowAvatar off for signed-out guests on web; the Book now button stays.
- Hide the back chevron (ShowBack off) only on the top-level tabs of the app, such as Explore or Trips.
Property names. Item 5 is copied from Figma as written, with Figma’s spelling of the properties. The code spells it showAvatar.
Property names. Item 6 is copied from Figma as written, with Figma’s spelling of the properties. The code spells it showBack.
When not to use it
Section titled “When not to use it”- More than once on a page, or inside a card or a modal.
The Figma page names no alternative. - To hold page actions such as “Export” or “Add rate”: put them in the page content, under the title.
The Figma page names no alternative. - With more than three nav links on web: move the rest into the Help page or the footer.
The Figma page names no alternative.
No alternative named. All 3 items above have an empty instead in Header.intent.json. From the release review, under “Warnings (not blocking)”, as written:
Check 2: all three dont_use_when entries have an empty instead: (1) “More than once on a page, or inside a card or a modal.”; (2) “To hold page actions such as “Export” or “Add rate”: put them in the page content, under the title.“; (3) “With more than three nav links on web: move the rest into the Help page or the footer.” The frame names no alternative component (entries 2 and 3 name a place, not a component).
Best practice
Section titled “Best practice”From the Figma documentation page (usage node 208:670), as written. These items aren’t carried into Header.intent.json, which has no field for them.
- Keep the app title short (one or two words) so it stays centred and never truncates.
- Turn ShowAvatar off for signed-out guests on web; the Book now button stays.
- Hide the back chevron (ShowBack off) only on the top-level tabs of the app, such as Explore or Trips.
What each variant is for
Section titled “What each variant is for”| Property | Value | What it is for |
|---|---|---|
type |
web |
at the top of every page of the guest website, with the current section as the first, darker link. |
type |
app |
at the top of each app screen below the status bar: back on the left, the screen name in the centre, one text action on the right when the screen has one, such as “Save” or “Mark read”. |
type |
backoffice |
above the content of each back office page, next to the Sidebar, with the page name and search. |
Accessibility
Section titled “Accessibility”- The root is a native <header> element.
src/components/Header/Header.tsx:103 - The web nav links sit in a <nav> landmark named “Main” (aria-label).
src/components/Header/Header.tsx:108 - The first web link, the current section, carries aria-current=“page”.
src/components/Header/Header.tsx:113 - The app back control is a native <button type=“button”> named “Back” (aria-label); its chevron icon is hidden from assistive technology (aria-hidden).
src/components/Header/Header.tsx:136 - The back chevron svg is aria-hidden and not focusable.
src/components/Header/Header.tsx:59 - The app title is rendered as an <h1>.
src/components/Header/Header.tsx:141 - The app action is a native <button type=“button”> whose accessible name is its text.
src/components/Header/Header.tsx:144 - The backoffice page title is rendered as an <h1>.
src/components/Header/Header.tsx:153 - The back and action buttons show a focus-visible outline in the focus border colour.
src/components/Header/Header.css:134
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”All Variants
Section titled “All Variants”The single-variant stories (Web, App, Backoffice, WebSignedOut, WebNoButton, WebNoButtonSignedOut, AppAction, AppNoBack, AppNoBackAction, BackofficeNoSearch, BackofficeNoAvatar, BackofficeNoSearchNoAvatar) are rows of the variant matrix; the Design tab links each one.
Import
Section titled “Import”import { Header } from "@layerbasesystemic/horizon-design-system";import type { HeaderProps, HeaderType } from "@layerbasesystemic/horizon-design-system";@layerbasesystemic/horizon-design-system/tokens.css and @layerbasesystemic/horizon-design-system/styles.css must be loaded too; see Developing.
Header.tsx is built from Logo: it imports it (Header.tsx:6) and renders <Logo> (Header.tsx:106). The registry’s Composes column for Header lists Logo.
Header.tsx is built from Link: it imports it (Header.tsx:5) and renders <Link> (Header.tsx:109). The registry’s Composes column for Header lists Link.
Header.tsx is built from Button: it imports it (Header.tsx:4) and renders <Button> (Header.tsx:119). The registry’s Composes column for Header lists Button.
Header.tsx is built from Avatar: it imports it (Header.tsx:3) and renders <Avatar> (Header.tsx:100). The registry’s Composes column for Header lists Avatar.
Header.tsx is built from SearchBar: it imports it (Header.tsx:7) and renders <SearchBar> (Header.tsx:156). The registry’s Composes column for Header lists SearchBar.
| Prop | Type | Default | Description |
|---|---|---|---|
type |
HeaderType |
"web" |
Figma type. web (default), app or backoffice. |
link1 |
string |
"Stays" |
web: nav link text (Figma Link 1). Link 1 is the current page, drawn darker. |
link2 |
string |
"Experiences" |
— |
link3 |
string |
"Help" |
— |
showButton |
boolean |
true |
web: Figma ShowButton (default true). |
showAvatar |
boolean |
true |
web and backoffice: Figma ShowAvatar (default true). Off on web = signed out. |
title |
string |
"Profile" |
app: centred title (Figma Title). |
showBack |
boolean |
true |
app: Figma ShowBack (default true). |
showAction |
boolean |
false |
app: Figma ShowAction (default false). |
action |
string |
"Save" |
app: text of the action on the right (Figma Action). |
pageTitle |
string |
"Calendar" |
backoffice: Figma PageTitle. |
showSearch |
boolean |
true |
backoffice: Figma ShowSearch (default true). |
buttonText |
string |
"Book now" |
Not a Figma property. Text of the nested web Button; Figma draws “Book now”. |
avatarSrc |
string |
— | Not a Figma property. Avatar photo (web, backoffice). Omitted, the circle is empty. |
avatarAlt |
string |
"" |
Not a Figma property. Avatar alt text; empty by default (decorative). |
searchPlaceholder |
string |
"Search" |
Not a Figma property. Backoffice search placeholder; Figma draws “Search”. |
link1Href |
string |
"#" |
Not a Figma property. Link destinations (web). |
link2Href |
string |
"#" |
— |
link3Href |
string |
"#" |
— |
onButtonClick |
(event: MouseEvent<HTMLButtonElement>) => void |
— | Not a Figma property. Handlers so the bar is usable. |
onBackClick |
(event: MouseEvent<HTMLButtonElement>) => void |
— | — |
onActionClick |
(event: MouseEvent<HTMLButtonElement>) => void |
— | — |
onSearch |
(value?: string) => void |
— | — |
HeaderProps also extends Omit<HTMLAttributes<HTMLElement>, "title">, so native attributes pass through to the element (Header.tsx:11).
Props that are not Figma properties. The stories’ header comment says: “Not Figma properties (added so the component is usable): buttonText, avatarSrc, avatarAlt, searchPlaceholder, link1Href..link3Href, onButtonClick, onBackClick, onActionClick, onSearch.” (Header.stories.tsx:11-12). They are declared at buttonText, avatarSrc, avatarAlt, searchPlaceholder, link1Href, link2Href, link3Href, onButtonClick, onBackClick, onActionClick, onSearch.
From the release review, under “Findings outside the gates”, as written:
Props that are not Figma properties. buttonText, avatarSrc, avatarAlt, searchPlaceholder, link1Href, link2Href, link3Href, onButtonClick, onBackClick, onActionClick, onSearch (Header.tsx:34-50). They are public API once published (a 0.x breaking-change surface under VERSIONING.md). Owner: a human, to accept them as intended API or ask the designer to draw them.
Composition is stated here, not in the intent. Header.intent.json has placement and pairs_with as empty lists, so the Usage tab leaves out “Where it goes” and “Composition”. Header does render Logo, Link, Button, Avatar, SearchBar: see the lines above.
From the release review, under “Findings outside the gates”, as written:
Empty placement and pairs_with. Header renders Logo, Link, Button, Avatar and SearchBar (Header.tsx:3-7) and the board row’s Composes lists all five, but pairs_with is [], because the stories import only Header. Check 1 allows an empty list. Owner: component-intent, if the team wants the composition recorded.
Union types
Section titled “Union types”HeaderType: web, app, backoffice
Tokens it needs
Section titled “Tokens it needs”Every CSS custom property Header.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-elevated |
#f9fafb |
#4d5361 |
--color-border-focus |
#1d44ba |
#6692f8 |
--color-border-subtle |
#eef1f5 |
#272a37 |
--color-text-link |
#1d44ba |
#94b3fc |
--color-text-primary |
#161925 |
#f9fafb |
--color-text-secondary |
#4d5361 |
#9ca2b1 |
--fontfamily-body |
Inter |
same as light |
--fontsize-2xl |
18px |
same as light |
--fontsize-lg |
13px |
same as light |
--fontsize-xl |
14px |
same as light |
--lineheight-2xl |
26px |
same as light |
--lineheight-lg |
20px |
same as light |
--lineheight-xl |
20px |
same as light |
--spacing-2xl |
24px |
same as light |
--spacing-md |
12px |
same as light |
--spacing-xl |
20px |
same as light |
This matches required_tokens in Header.intent.json exactly.
Figma node
Section titled “Figma node”Page Header (57:1643), documentation frame ❖ header (208:631), component set header (208:43). The file is shared with the team only, so the frame and the link ask anyone outside it to sign in.
Variant matrix
Section titled “Variant matrix”type (3) = 3 cells. The component set (208:43) publishes three variants, type=web (208:7, 1280x64), type=app (208:29, 390x52) and type=backoffice (208:36, 1220x56). Link 1, Link 2, Link 3, ShowButton, ShowAvatar, Title, ShowBack, ShowAction, Action, PageTitle and ShowSearch are properties of the set, not variants. The specimen board (209:4849) lays out instances of the set in 8 columns by 12 rows, and three more instances sit loose on the canvas beside the labels “Signed out” (208:635), “ShowAction: true” (208:654) and “ShowBack: false” (208:662). Figma draws no size, hover, pressed, disabled or focus state.
type |
Figma node | Story |
|---|---|---|
web |
208:7 |
Web |
app |
208:29 |
App |
backoffice |
208:36 |
Backoffice |
Themes
Section titled “Themes”The header component set renders every cell once, in one theme. It has no separate light and dark frames.
The token build defines 179 tokens for light and redeclares 50 for dark; the Code tab shows Header’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 Header.css at b9ffb76 does with each.
| Layer | Property | Figma value | In the code |
|---|---|---|---|
| type=web (208:7) | height | 64px |
height: 64px; |
| type=backoffice (208:36) | height | 56px |
height: 56px; |
| type=app (208:29) | height | 52px |
height: 52px; |
| Button, type=web (208:19) | width | 80px |
width: 80px; |
| Searchbar, type=backoffice | width | 260px |
width: 260px; |
| Left (208:30) and Right (208:34), type=app | width | 72px |
width: 72px; |
| Back, type=app (208:31) | width and height | 20px |
width: 20px; |
| Title, type=app (208:33) | font size (typed as 18px in the layer; the backoffice page title binds the same size to a variable) | 18px |
font-size: var(--fontsize-2xl); |
| Bottom border, every type | colour (bound in Figma to the variable color/border/subtle, which is not named like a –color-… token; the code reads –color-border-subtle) | #eef1f5 |
border-bottom: var(--border-width-sm) solid var(--color-border-subtle); |
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 |
|---|---|---|---|---|
--fontSize-2xl |
18 |
--fontsize-2xl |
18px |
yes |
--fontWeight-semibold |
Semi Bold |
no such token | — | no token |
--fontFamily-body |
Inter |
--fontfamily-body |
Inter |
yes |
--lineHeight-2xl |
26 |
--lineheight-2xl |
26px |
yes |
--spacing-sm |
8 |
--spacing-sm |
8px |
yes |
--color-text-primary |
#161925 |
--color-text-primary |
#161925 |
yes |
--fontSize-xl |
14 |
--fontsize-xl |
14px |
yes |
--fontWeight-medium |
Medium |
no such token | — | no token |
--lineHeight-xl |
20 |
--lineheight-xl |
20px |
yes |
--color-text-secondary |
#4d5361 |
--color-text-secondary |
#4d5361 |
yes |
--fontWeight-regular |
Regular |
no such token | — | no token |
--spacing-xl |
20 |
--spacing-xl |
20px |
yes |
--color-text-inverse |
#f9fafb |
--color-text-inverse |
#f9fafb |
yes |
--fontSize-xs |
10 |
--fontsize-xs |
10px |
yes |
--lineHeight-xs |
16 |
--lineheight-xs |
16px |
yes |
--radius-sm |
6 |
--radius-sm |
6px |
yes |
--color-primary-default |
#3b71f2 |
--color-primary-default |
#2b5ad6 |
no |
--radius-full |
999 |
--radius-full |
999px |
yes |
--spacing-2xl |
24 |
--spacing-2xl |
24px |
yes |
--color-bg-elevated |
#f9fafb |
--color-bg-elevated |
#f9fafb |
yes |
--fontSize-lg |
13 |
--fontsize-lg |
13px |
yes |
--lineHeight-lg |
20 |
--lineheight-lg |
20px |
yes |
--spacing-md |
12 |
--spacing-md |
12px |
yes |
--radius-xs |
2 |
--radius-xs |
2px |
yes |
--border-width-sm |
1 |
--border-width-sm |
1px |
yes |
--color-border-default |
#d7dee7 |
--color-border-default |
#d7dee7 |
yes |
--color-text-link |
#1d44ba |
--color-text-link |
#1d44ba |
yes |
--fontWeight-semibold, --fontWeight-medium, --fontWeight-regular are bound in Figma but the token build has no token of that name.
--color-primary-default holds a different value in Figma from the token of the same name in the build. Header.css doesn’t read that token, but the stylesheet of the component Header is built from does (Button.css), so the Button rendered inside Header uses the build’s value, not Figma’s.
Design gaps recorded against it
Section titled “Design gaps recorded against it”Sizes with no token, and the focus offset. The ruling “2026-10-04 · Header sizes with no token” in decisions.md accepts these literals in Header.css, as written:
Value Property Selector Lines 64pxheight (web bar).hz-header--web1656pxheight (backoffice bar).hz-header--backoffice2152pxheight (app bar).hz-header--app2680pxwidth (nested web Button).hz-header .hz-header__button62260pxwidth (nested backoffice Search field).hz-header .hz-header__search6672pxwidth (app side column).hz-header__side7420pxwidth, height (back icon).hz-header__back-icon94, 952pxoutline-offset (keyboard focus ring on the back and action buttons).hz-header__back:focus-visible, .hz-header__action:focus-visible137
The focus offset is at Header.css:137, in the keyboard-focus rule that opens at Header.css:134. The ruling goes on: “The 2px focus offset is not drawn in Figma: the engineer added the keyboard focus ring, which Figma does not specify. It is accepted at the value –border-width-md resolves to, until the value is bound to that token. A fix that swaps it for the token (commit 7f1a9f2 on build/header-focus-token) was made but not shipped, so the literal remains on main.” From the release review, under “Findings outside the gates”, as written:
Reviewed code carries a literal that a ready fix removes. origin/build/header-focus-token (7f1a9f2, one line in Header.css, plus a decisions.md change) is tested and Passed on the board but not shipped. If it ships after this review, the row-137 part of the ruling stops covering it and the review is stale for that line; re-review then.
States Figma doesn’t draw. The component description (node 208:43) and the matrix above cover the three types only. The stylesheet adds a keyboard-focus ring on the back and action buttons at Header.css:134-138; Figma draws no hover, pressed, disabled or focus state.
From the release review, under “Findings outside the gates”, as written:
Unspecified states. Figma draws no hover, pressed, disabled or focus state. The engineer added a :focus-visible ring on the back and action buttons (Header.css:134-138), and the nav Link anchors keep Link’s hover underline (QA report). The 2px offset is the one the ruling covers; the unshipped 7f1a9f2 would bind it to –border-width-md. Owner: the designer for the states; the engineer to ship 7f1a9f2 if wanted (then the ruling’s 137 row no longer applies).
The back chevron is drawn by hand. BackIcon (Header.tsx:53-71) is an inline <svg> with viewBox="0 0 20 20" (Header.tsx:57), strokeWidth="1.75" (Header.tsx:65) and the path d="M12.5 4L6.5 10L12.5 16" (Header.tsx:63). Figma’s Back layer (node 208:31) is an exported vector.
From the release review, under “Findings outside the gates”, as written:
Unlisted raw numbers in the component source. The back chevron is a hand-drawn SVG (viewBox=“0 0 20 20”, strokeWidth=“1.75”, path coordinates, Header.tsx:55-69) where Figma uses an exported vector. These are SVG user-space attributes, not stylesheet literals, so gate 2 (stylesheet) is not failed, but they are not token-bound and are not in the ruling. Owner: the designer, to supply the icon; the engineer to swap it.
Font weights are numbers. Header.css sets font-weight: 400 (Header.css:52), font-weight: 500 (Header.css:57), font-weight: 600 (Header.css:108), font-weight: 500 (Header.css:119), font-weight: 500 (Header.css:129), where Figma binds --fontWeight-regular, --fontWeight-medium and --fontWeight-semibold. The ruling’s “Not ruled” paragraph says, as written: “The font weights 400, 500 and 600, which are unitless numbers and need no ruling.”
Colour drift. The Figma variable --color-primary-default (#3b71f2) holds a different value from the token build; see the table above. Header.css does not read it: the nested web Button, from the component it is built from, does.
From the release review, under “Findings outside the gates”, as written:
Pipeline colour drift. –color-primary-default renders #2b5ad6 (Figma #3b71f2). Accepted drift under the ruling’s “Not ruled” paragraph and the QA report. Same as Button, Chip, Toggle, Dropdown and File.
- 2026-10-04 · Header sizes with no token (decisions.md). These literals in src/components/Header/Header.css are accepted, because they are what the Figma nodes specify, until the designer adds matching size tokens. Accepted values:
64px(height (web bar),.hz-header--web, line 16);56px(height (backoffice bar),.hz-header--backoffice, line 21);52px(height (app bar),.hz-header--app, line 26);80px(width (nested web Button),.hz-header .hz-header__button, line 62);260px(width (nested backoffice Search field),.hz-header .hz-header__search, line 66);72px(width (app side column),.hz-header__side, line 74);20px(width, height (back icon),.hz-header__back-icon, lines 94, 95);2px(outline-offset (keyboard focus ring on the back and action buttons),.hz-header__back:focus-visible, .hz-header__action:focus-visible, line 137). 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 font weights 400, 500 and 600, which are unitless numbers and need no ruling. The widths 1280, 390 and 1220 that Figma draws for the bars: the code sets the bar width to 100% and only the story decorators apply them. The primary colour, which uses –color-primary-default (#2b5ad6) and differs from the #3b71f2 Figma shows: that is accepted pipeline drift, not a gate finding. Any state Figma does not draw. - From the release review: Check 2: all three dont_use_when entries have an empty instead: (1) “More than once on a page, or inside a card or a modal.”; (2) “To hold page actions such as “Export” or “Add rate”: put them in the page content, under the title.“; (3) “With more than three nav links on web: move the rest into the Help page or the footer.” The frame names no alternative component (entries 2 and 3 name a place, not a component).
Every commit to src/components/Header up to b9ffb76, newest first, with the published version that carries it.
| Commit | Date | Version | Change |
|---|---|---|---|
a08a17b |
2026-10-04 | 0.2.0 | Header intent: carry Figma Best Practice lines into use_when |
b11e0c0 |
2026-10-04 | 0.2.0 | Header: intent file (from Figma usage frame 208:670 and current code) |
8be1087 |
2026-10-04 | 0.2.0 | Header: build from Figma 208:43 (web, app, backoffice; every boolean variation) |