Deck Shell
A top navigation app frame. A marker glides to the current link, links that do not fit move into a More menu, the bar can slide away on scroll, and on a narrow frame the links open as a panel under the bar.
pixikit.com/docs/app-ui/shells/deck-shell
Customize
Search
Contained
Height640px
Tone
Link style
Overlap
Hide on scroll
Breakpoint760px
Content width
Props
26| Name | Type | Default | Description |
|---|---|---|---|
nav | DeckNavItem[] | Required | The main links, in order. Links that do not fit move into a More menu. |
groups | DeckGroup[] | [] | Secondary labelled lists, shown in the collapsed panel. |
current | string | None | The id of the current page, when you hold the state. |
defaultCurrent | string | None | The id of the current page at first, when the shell holds the state. |
onNavigate | (id: string) => void | None | Called with the id of the link the user picks. |
brand | ReactNode | None | The logo or name at the start of the bar. |
user | DeckUser | None | The signed-in person. |
userMenu | MenuEntry[] | None | The rows of the menu the user button opens. |
search | boolean | false | Shows a search button with its shortcut hint. |
onSearch | () => void | None | Called when the search button is pressed or Cmd or Ctrl plus K is used inside the shell. |
actions | ReactNode | None | Extra controls in the bar, such as a notifications button. |
children | ReactNode | None | The page. |
contained | boolean | false | Keeps menus and tooltips inside the shell instead of on the page. |
height | number | string | 640 | The height of the shell: px or any CSS length. It fills this, never the window. |
tone | "plain" | "muted" | "inverted" | "plain" | The bar surface: the page colour, muted, or inverted. |
linkStyle | "underline" | "pill" | "underline" | How the current link is marked: a line under it or a soft pill behind it. |
title | string | None | A page heading shown in a band under the bar. |
titleActions | ReactNode | None | Controls at the end of the heading band, such as a button. |
overlap | boolean | false | Makes the heading band tall and tinted, and lets the page card rise over its lower edge. |
secondary | DeckSecondaryItem[] | [] | A second row of links under the bar. |
secondaryCurrent | string | None | The id of the current secondary link, when you hold the state. |
onSecondaryNavigate | (id: string) => void | None | Called with the id of the secondary link the user picks. |
hideOnScroll | boolean | false | Slides the bar away when the page scrolls down and back when it scrolls up. |
breakpoint | number | 760 | Below this width in px the links collapse into a panel under the bar. |
contentWidth | "full" | "contained" | "full" | Centres the page in a maximum width. |
className | string | None |