Site Cahier
The template of a tool site (ui., java., ts., the motion lab) that wears krizaka.com's identity: the Cahier's paper, the site's own bird and hue, taped prints, doodles, grades — a frame and regions to compose, never a fixed page.
import { SiteCahier, SiteCahierHero, SiteCahierDoc } from "@krizaka/ui/site-cahier";Web only — React, from @krizaka/ui/site-cahier. Beta: its API may still change in a minor version.
- Mobile · n/a. A whole page of a public site; a phone app's screens are built from Screen, Header and the native primitives.
- Desktop · n/a. A public site's page, not a window of the Mac app.
Why it is here. The frame of ui.krizaka.com, java., ts. and the motion lab (one issue each, krizaka/krizaka-ui#548).
When to use
- The home, the docs index, a documentation page or the changelog of an open-source tool of the family: Krizaka UI, Java, TypeScript, Motion.
- Any site of the family that should read as the same notebook as www.krizaka.com while keeping its own bird and its own accent.
When not to use
- A product's marketing page, or a plain landing page with no notebook identity.Use instead: Landing page
Installation
Install
npm install @krizaka/ui @krizaka/tailwind @krizaka/tokens tailwindcssStyles
@import "tailwindcss";
@import "@krizaka/tailwind";
@import "@krizaka/ui/tailwind.css";Import
import { SiteCahier, SiteCahierHero, SiteCahierDoc } from "@krizaka/ui/site-cahier";Examples
Krizaka UI — the duck builds
A home that opens on the duck taped beside the title, a doodle arrow and a measured grade.
Java — the owl reads
A home whose hero is a versus card of two releases, then the modules as specimen tags.
Motion — the flamingo answers
A home whose hero is a live demo in a burst of speed lines, then taped prints.
TypeScript — a documentation page
A reading page on ruled paper with its contents beside it, a circled word and a margin note.
TypeScript — the changelog
The shared changelog template inside the Cahier's frame, under the pigeon's bar.
Props
SiteCahier
A tool site's frame: the Cahier's bar with the site's bird, its hue, the page, and the family footer.
| Prop | Type | Default | Description |
|---|---|---|---|
birdrequired | "falcon" | "owl" | "duck" | "flamingo" | "pigeon" | "lovebird" | "crane" | "magpie" | "beaver" | — | The site's bird, by the brand reference: the duck builds, the owl reads, the pigeon delivers, the flamingo answers, the falcon watches. |
namerequired | string | — | The site's name, never translated (Krizaka UI). |
navrequired | readonly SiteCahierNavItem[] | — | The site's pages, in the bar. |
siterequired | SiteId | — | The site (@krizaka/ui/sites): it chooses the footer's signature and marks the family. |
bar | ReactNode | — | Your own bar (the shared NavBar, with search and the language), in place of the simple one. |
footer | false | Omit<SiteFooterProps, "current"> | — | The family footer's props (version, legal, labels, the site's own columns as children); false for none. |
homeHref | string | / | The address of the home, on the bird and the name. |
hue | number | — | The site's accent hue, 0 to 360: it tints the rails and the small accents of the blocks. Unset, the brand accent. |
linkAs | LinkComponent | — | The app's link component (Next's Link). |
navLabel | string | Main | The accessible name of the navigation. |
SiteCahierDoc
A documentation page on ruled paper: the title, the article in a reading column and, beside it, the page's contents.
| Prop | Type | Default | Description |
|---|---|---|---|
titlerequired | ReactNode | — | The page's h1. |
aside | ReactNode | — | The beside-column (the table of contents, the notes of the margin). |
asideLabel | string | On this page | The accessible name of the beside-column. |
eyebrow | ReactNode | — | A mono line above the title (Guide · 4 min). |
SiteCahierHero
The first screen of a tool site's page: a PageHero on plain paper, the bird taped beside it, a doodle in the margin.
| Prop | Type | Default | Description |
|---|---|---|---|
titlerequired | ReactNode | — | The page's title: the h1. |
align | "center" | "start" | start | center for a page that opens on its title alone (a hub, a contact page). |
aside | ReactNode | — | Your own picture beside the title, in place of the bird's print: a live demo, a versus card. |
back | { href: string; label: string; } | — | The way back to the parent page, above the eyebrow. |
bird | "falcon" | "owl" | "duck" | "flamingo" | "pigeon" | "lovebird" | "crane" | "magpie" | "beaver" | — | The site's bird, taped in the notebook beside the title. |
birdCaption | ReactNode | — | The note written under the print (Plate I · the duck builds). |
doodle | ReactNode | — | A doodle (or any mark) laid in the hero's margin, decorative. |
eyebrow | ReactNode | — | A short mono line above the title (where the reader is: Open source · building block). |
lead | ReactNode | — | One or two sentences under the title: what the page gives the reader. |
linkAs | LinkComponent | — | The app's link component for internal addresses (Next's Link); an <a> otherwise. |
size | PageSize | default | The width of the content. |
Accessibility
- A
headerwith a namednav(the page being read hasaria-current="page"), onemainand the family footer'sfooter: render the template once per page and no othermain. - The bird in the bar and in the hero is decoration; the site's name is the link's text.
- Dark is chalk on slate and light is ink on paper, both at AA; the regions keep a phone layout and never scroll sideways.
Best practices
- Adopt the language, not the layout: pick your own hero, your own featured pieces and your own rhythm — two tool sites must not look like one page with another name.
- One bird per site, by the brand reference: the falcon watches (security), the owl reads, the duck builds (code), the flamingo answers or gets paid, the pigeon delivers.
- Proposed mapping: Krizaka UI → duck, Java → owl, TypeScript → pigeon, Motion → flamingo. Each site also sets its own
hue. - Playful pieces stay refined: a doodle or a grade supports the content, which comes first and stays readable; every grade is measured, with its source.
- Pass the shared
NavBarasbarwhen the site needs search or a language switch; the simple bar is for a small site.
Related components
Generated from the code of @krizaka/ui 3.63.1: its meta.ts, its examples and its types.Edit this documentation on GitHub