Sidenav
The sidebar, 280 wide, and the 64 wide rail it collapses to. Rows are 32 tall with radius 10 and 10 inside.
Sidebar
From the top: the header (Kuori mark, collapse, back, forward, refresh), search with Compose, the mailboxes, Labels and Accounts (each opens and closes from its title), then Spam, Trash, Integrations, Settings and the user. Rows are Body/SM text/tertiary, state/hover on hover (instant, pointer only) and state/selected when current.
Collapsed rail
Icons only, 40 by 32, with their names in tooltips on the right. The Kuori mark turns into the expand button on hover. Collapsing takes 200ms with ease-in-out: the content slides with a transform while the sidebar and the rail crossfade. Width never animates.
Usage
import { Sidenav, SidenavHeader, SidenavItem, Rail, RailItem } from "@kuori/ui/sidenav";<SidenavItem icon="inbox" label="Inbox" count={12} selected />SidenavItem
PropTypeDescription
iconRequiredIconNameA 16px icon; it fills when selected
labelRequiredstringThe mailbox
countnumberShown on the right in text/quaternary
selectedbooleanstate/selected with Label/MD text/primary
...propsButtonHTMLAttributesonClick and the rest go to the button
SidenavSection
PropTypeDescription
titleRequiredstringLabels, Accounts
openRequiredbooleanShows the rows. The chevron turns in 150ms; the rows appear instantly
onOpenChangeRequired(open: boolean) => voidThe title toggles it
addLabelstringShows the + with this label
onAdd() => voidThe + button
SidenavLabel, SidenavAccount and SidenavUser
PropTypeDescription
nameRequiredstringThe label, account or person
logoReactNodeSidenavLabel: an 18px company logo. Without one, #
emailstringSidenavAccount: the address, truncated
colourTagColourSidenavAccount: the dot, in tag/{colour}/icon
planstringSidenavUser: the plan after the nameDefault:
FreeRailItem
PropTypeDescription
iconRequiredIconNameA 16px icon; it fills when selected
labelRequiredstringThe mailbox
selectedbooleanstate/selected with Label/MD text/primary
shortcutstringShown in the tooltip
dotbooleanThe accent dot top right, for unread mail