Detail layout
One object's page: the way back, its media, name, status, facts and actions, its tabs, the content and a side panel that goes under the content on a phone.
- Domaine
- Navigation et cadre
- Niveau de support
- Taille
- 2.9 kB gzip, budget 2.4 kB
- Qui l'utilise
- 5 fichiers des produits et sites en production l'importent (Verikora : 3, Folioviv : 2) Compté dans l'inventaire daté du 2026-11-23.
import { DetailLayout, DetailSection, DetailNotes, FormSteps, FormTotals } from "@krizaka/ui/detail-layout";Web uniquement — React, depuis @krizaka/ui/detail-layout. Bêta : son API peut encore changer à une version mineure.
- Mobile · n/a. A phone shows one object per screen, under its header. → Screen
Pourquoi il est là. Used by Verikora, Folioviv.
Quand l’utiliser
- A video, a job, an account, a pack, an order.
- Any object reached from a list.
Quand ne pas l’utiliser
- For a list and its item side by side.À la place : Split view
- For a screen of figures.À la place : Dashboard layout
Installation
Installer
npm install @krizaka/ui @krizaka/tailwind @krizaka/tokens tailwindcssStyles
@import "tailwindcss";
@import "@krizaka/tailwind";
@import "@krizaka/ui/tailwind.css";Importer
import { DetailLayout, DetailSection, DetailNotes, FormSteps, FormTotals } from "@krizaka/ui/detail-layout";Exemples
A video
A video page: thumbnail, status, facts, tabs and the sales beside.
Tip checkout
Who is paid, the amount in one tap, an optional word, the total beside the pay button.
A client
The profile banner, binder sections (DetailSection) and the notes column (notes, DetailNotes) (#653).
A new invoice
FormSteps numbered, FormTotals sticky beside them, and the StickyAction in task mode with the total (#653).
A job
An engine job without tabs or side panel.
A person's page
cover: the header becomes a ProfileBanner — the cover, the avatar over its edge, the name, the actions (#650).
Props
DetailLayout
One object's page: header (back, media, name, status, facts, actions), tabs, content and a side panel.
| Prop | Type | Défaut | Description |
|---|---|---|---|
titlerequis | ReactNode | — | The object's name: the h1. |
actions | ReactNode | — | The object's actions (edit, publish, a DropdownMenu). |
aside | ReactNode | — | The side panel: details, related objects, activity (under the content on a phone). |
back | ReactNode | — | The way back to the list: your router's link (<Link href="/videos">Videos</Link>), drawn with its arrow. |
cover | ReactNode | — | A person's or a place's page (a client, a shop, a creator): the header becomes a ProfileBanner — this cover (an
<img alt="">, or true for a tint of the brand's accent), media as the avatar overlapping it, then the name and the actions. |
eyebrow | ReactNode | — | A mono line above the name (the object's kind, its id). |
media | ReactNode | — | A thumbnail, a cover or an avatar beside the name; with cover, the avatar overlapping the cover. |
meta | ReactNode | — | Under the name: its facts (the author, a date, a count — Facts or plain text). |
notes | ReactNode | — | A notes column (DetailNotes) at the top of the side panel, before aside. |
status | ReactNode | — | Beside the name: its status (a Badge). |
tabs | ReactNode | — | Under the header: the object's tabs (Tabs.List of
@krizaka /ui/tabs, inside your Tabs.Root around the layout). |
DetailNotes
The notes column of a person's or an object's page: numbered notes and an add field.
| Prop | Type | Défaut | Description |
|---|---|---|---|
emptyLabelrequis | string | — | Said when there is none. |
notesrequis | readonly DetailNote[] | — | The notes, oldest first. |
titlerequis | ReactNode | — | The column's name (Notes). |
add | ReactNode | — | Under the list: the add field (a Field and a Button, a small form). |
DetailSection
A binder section of the main column: a titled region on a card, its name on a tab at the top-left corner.
| Prop | Type | Défaut | Description |
|---|---|---|---|
titlerequis | ReactNode | — | The binder tab: names the section (Invoices). |
action | ReactNode | — | On the right of the title: one action (See all). |
level | 2 | 3 | 2 | The title's level. |
FormSteps
The numbered steps of a long form (a new invoice: client, lines, terms): an ordered list, each step a named region.
| Prop | Type | Défaut | Description |
|---|---|---|---|
stepsrequis | readonly FormStepData[] | — | The steps in order: an id, a title and their fields. |
Accessibilité
- The name is the page's
h1. - The side panel is an
aside; on a phone it comes after the content in reading order.
Bonnes pratiques
- The status beside the name, in words (a Badge), not only a colour.
- Two or three actions at most in the header; the rest in a DropdownMenu.
- Put the tabs'
Tabs.Rootaround the layout so the content follows the tab.
Composants liés
Générée depuis le code de @krizaka/ui 5.3.4 : son meta.ts, ses exemples et ses types.Modifier cette documentation sur GitHub