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
iconRequired
IconName
A 16px icon; it fills when selected
labelRequired
string
The mailbox
count
number
Shown on the right in text/quaternary
selected
boolean
state/selected with Label/MD text/primary
...props
ButtonHTMLAttributes
onClick and the rest go to the button

SidenavSection

PropTypeDescription
titleRequired
string
Labels, Accounts
openRequired
boolean
Shows the rows. The chevron turns in 150ms; the rows appear instantly
onOpenChangeRequired
(open: boolean) => void
The title toggles it
addLabel
string
Shows the + with this label
onAdd
() => void
The + button

SidenavLabel, SidenavAccount and SidenavUser

PropTypeDescription
nameRequired
string
The label, account or person
logo
ReactNode
SidenavLabel: an 18px company logo. Without one, #
email
string
SidenavAccount: the address, truncated
colour
TagColour
SidenavAccount: the dot, in tag/{colour}/icon
plan
string
SidenavUser: the plan after the nameDefault: Free

RailItem

PropTypeDescription
iconRequired
IconName
A 16px icon; it fills when selected
labelRequired
string
The mailbox
selected
boolean
state/selected with Label/MD text/primary
shortcut
string
Shown in the tooltip
dot
boolean
The accent dot top right, for unread mail