Trio Shell
A three pane workspace for mail or tickets: navigation, a list and a detail, plus an optional inspector. The dividers resize by drag or keys, the inspector slides in, and on narrow widths one pane shows at a time.
pixikit.com/docs/app-ui/shells/trio-shell
Customize
Search
Nav style
Contained
Height640px
Default list width320px
Default inspector width300px
Min list width240px
Max list width520px
Default inspector open
Props
35| Name | Type | Default | Description |
|---|---|---|---|
nav | TrioNavItem[] | Required | The main links, in order. |
groups | TrioGroup[] | [] | Secondary labelled lists under the main links, such as labels or teams. |
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 item the user picks. |
brand | ReactNode | None | The logo or name at the top of the navigation. Put the mark first: it is what stays in the rail. |
user | TrioUser | None | The signed-in person. |
userMenu | MenuEntry[] | None | The rows of the menu the user block opens. |
search | boolean | false | Shows a search button with its shortcut hint in the navigation. |
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 at the end of the list header, such as a compose button. |
children | ReactNode | None | The detail pane: the item chosen in the list. |
list | ReactNode | None | The list pane: rows to choose from. |
listTitle | string | None | The heading of the list pane. |
inspector | ReactNode | None | The inspector pane, shown beside the detail. |
inspectorTitle | string | None | The heading of the inspector pane. |
navStyle | "rail" | "sidebar" | "sidebar" | The navigation as an icon rail with tooltips, or a full sidebar. |
contained | boolean | false | Keeps drawers, sheets, 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. |
listWidth | number | None | The list width in px, when you hold the state. |
defaultListWidth | number | 320 | The list width in px at first, when the shell holds the state. Double click on its divider returns to it. |
onListWidthChange | (width: number) => void | None | Called with the next list width. |
inspectorWidth | number | None | The inspector width in px, when you hold the state. |
defaultInspectorWidth | number | 300 | The inspector width in px at first, when the shell holds the state. Double click on its divider returns to it. |
onInspectorWidthChange | (width: number) => void | None | Called with the next inspector width. |
minListWidth | number | 240 | The smallest list width in px. |
maxListWidth | number | 520 | The largest list width in px. |
persistKey | string | None | Remembers the widths in local storage under this key. |
inspectorOpen | boolean | None | Whether the inspector is open, when you hold the state. |
defaultInspectorOpen | boolean | false | Whether the inspector starts open, when the shell holds the state. |
onInspectorOpenChange | (open: boolean) => void | None | Called with the next inspector state. |
detailOpen | boolean | None | On a compact width: whether the detail covers the list. Set it when an item is chosen. |
onDetailOpenChange | (open: boolean) => void | None | Called when the Back button closes the detail. |
breakpoints | TrioBreakpoints | { compact: 640, medium: 980 } | The widths where the layout changes: all panes, then rail and sheet, then one pane. |
className | string | None |