Skip to content
PixiKit

Rail Shell

A sidebar app frame. The sidebar narrows to an icon rail with tooltips, one highlight glides between the links, and on a narrow frame the sidebar opens as a drawer.

pixikit.com/docs/app-ui/shells/rail-shell

Customize

Search
Contained
Height640px
Default collapsed
Header
Tone
Content width
Breakpoint720px

Props

23
NameTypeDefaultDescription
navRailNavItem[]RequiredThe main links, in order.
groupsRailGroup[][]Secondary labelled lists under the main links, such as teams.
currentstringNoneThe id of the current page, when you hold the state.
defaultCurrentstringNoneThe id of the current page at first, when the shell holds the state.
onNavigate(id: string) => voidNoneCalled with the id of the item the user picks.
brandReactNodeNoneThe logo or name at the top of the sidebar. Put the mark first: it is what stays when the sidebar narrows.
userRailUserNoneThe signed-in person.
userMenuMenuEntry[]NoneThe rows of the menu the user block opens.
searchbooleanfalseShows a search button with its shortcut hint.
onSearch() => voidNoneCalled when the search button is pressed or Cmd or Ctrl plus K is used inside the shell.
actionsReactNodeNoneExtra controls next to the search, such as a notifications button.
childrenReactNodeNoneThe page.
containedbooleanfalseKeeps the mobile drawer, menus and tooltips inside the shell instead of on the page.
heightnumber | string640The height of the shell: px or any CSS length. It fills this, never the window.
collapsedbooleanNoneWhether the sidebar is narrowed to an icon rail, when you hold the state.
defaultCollapsedbooleanfalseWhether the sidebar starts narrowed, when the shell holds the state.
onCollapsedChange(collapsed: boolean) => voidNoneCalled with the next collapsed state.
persistKeystringNoneRemembers the collapsed state in local storage under this key.
headerbooleanfalseAdds a top bar for the search, the actions and the user menu; without it the user sits at the bottom of the sidebar.
tone"plain" | "muted" | "inverted""plain"The sidebar surface: the page colour, muted, or inverted.
contentWidth"full" | "contained""full"Centres the page in a maximum width.
breakpointnumber720Below this width in px the sidebar leaves the layout and opens as a drawer.
classNamestringNone

More shells blocks in Pro

View all

Related