Krizaka UI
Krizaka UI
Patterns

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.

WebBetaLayouts

Web only — React, from @krizaka/ui/detail-layout. Beta: its API may still change in a minor version.

Why it is here. the web apps' adoption: Orochia (PS5), Orazaka (PS6): the page of one video, job or account.

When to use

  • A video, a job, an account, a pack, an order.
  • Any object reached from a list.

When not to use

Installation

Install

npm install @krizaka/ui @krizaka/tailwind @krizaka/tokens tailwindcss

Styles

@import "tailwindcss";
@import "@krizaka/tailwind";
@import "@krizaka/ui/tailwind.css";

Import

import { DetailLayout } from "@krizaka/ui/detail-layout";

Examples

A video

Orochia's video page: thumbnail, status, facts, tabs and the sales beside.

Video · v-2087

Night shoot, part 2

Published
  • 12:48
  • Unlock €4.99
  • 18+ checked
The second half of the night shoot in Old Montréal: the rooftop, the rain, the last take at dawn.

Tip checkout

Who is paid, the amount in one tap, an optional word, the total beside the pay button.

Tip

Say thanks to Elena

She keeps 90 %. Paid out every Monday.

A job

An engine job without tabs or side panel.

Job · job-4822

Podcast transcript

Running
Whisper large · started 5 min ago

The transcript appears here as it is written.

Props

One object's page: header (back, media, name, status, facts, actions), tabs, content and a side panel.

PropTypeDefaultDescription
titlerequiredReactNode—The object's name: the h1.
actionsReactNode—The object's actions (edit, publish, a DropdownMenu).
asideReactNode—The side panel: details, related objects, activity (under the content on a phone).
backReactNode—The way back to the list: your router's link (<Link href="/videos">Videos</Link>), drawn with its arrow.
eyebrowReactNode—A mono line above the name (the object's kind, its id).
mediaReactNode—A thumbnail, a cover or an avatar beside the name.
metaReactNode—Under the name: its facts (the author, a date, a count — Facts or plain text).
statusReactNode—Beside the name: its status (a Badge).
tabsReactNode—Under the header: the object's tabs (Tabs.List of @krizaka /ui/tabs, inside your Tabs.Root around the layout).

Accessibility

  • The name is the page's h1.
  • The side panel is an aside; on a phone it comes after the content in reading order.

Best practices

  • 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.Root around the layout so the content follows the tab.

Generated from the code of @krizaka/ui 3.8.0: its meta.ts, its examples and its types.Edit this documentation on GitHub

On this page