rokle

Personality

20
40
70
15

Active brand: Meridian

Adjust sliders to see every component on the page respond in real time.

Sidebar

Collapsible application sidebar with navigation items, optional header, and footer slot.

Examples

Basic

Minimal sidebar with flat navigation links.

With sections

Navigation grouped into labelled sections with a separator.

With active state

Highlighted active link using brand-subtle background.

With footer

User profile footer pinned to the bottom of the sidebar.

Installation

pnpm add @rokle/components @rokle/tokens

Installs with the default Rokle brand. Generate a custom brand on rokle.app to use your own colours and personality.

Usage

import { Sidebar } from "@rokle/components";
import { Sidebar } from "@rokle/components";

export function Example() {
  return <Sidebar />;
}

API Reference

PropTypeDefaultDescription
collapsedbooleanfalseWhether the sidebar is in collapsed icon-only mode.
onCollapsedChange(collapsed: boolean) => void-Called when collapsed state changes.
childrenReactNode-Sidebar content.