Skip to content

SidebarRail in a desktop app

The same sidebar inside an Electron window with a hidden title bar: desktop="mac" leaves a 52 px draggable strip over the rail and the panel, where the traffic lights sit (the grey dots here); "windows" and "linux" leave 32 px under the title bar overlay. titleBarHeight sets another height.

  • SidebarRail

PreviewLink to the section Preview

Live in all three themes. Everything here is interactive.

Light theme, SidebarRail in a desktop app

Skip to contentSkip to navigation

Variants

The rail is compact. Point at Commerce: its panel opens to the side; point at Products and its pages open one level further to the side, lined up with the row. The pin docks the panel beside the content. Narrow the window for the phone drawer, where each level is a screen.

#/commerce/products/variants

Dark theme, SidebarRail in a desktop app

Skip to contentSkip to navigation

Variants

The rail is compact. Point at Commerce: its panel opens to the side; point at Products and its pages open one level further to the side, lined up with the row. The pin docks the panel beside the content. Narrow the window for the phone drawer, where each level is a screen.

#/commerce/products/variants

High contrast theme, SidebarRail in a desktop app

Skip to contentSkip to navigation

Variants

The rail is compact. Point at Commerce: its panel opens to the side; point at Products and its pages open one level further to the side, lined up with the row. The pin docks the panel beside the content. Narrow the window for the phone drawer, where each level is a screen.

#/commerce/products/variants

UsageLink to the section Usage

tsx
import { SidebarRail } from '@skribly/ui/shell'
tsx
<SidebarRail desktop="mac" sections={sections} current={pathname} labels={labels} />
// main process: new BrowserWindow({ titleBarStyle: 'hiddenInset' })

Every label is a prop, so the app passes its own words in its own language. See no built-in text.

AccessibilityLink to the section Accessibility

  • The strip is aria-hidden and holds no control, so nothing is lost to the drag region; the keys, names and targets are those of the web rail.

This demo runs through axe in all three themes on every test run. See what the tests check.

Search this site

Arrows move through the results, Enter opens one, Esc closes. Ctrl K /