CLI previewInstall commands shown on this site are not released yet.

DocsComponentsLayout

Sidebar

React example follows below.
ts
import {
Sidebar, SidebarHeader, SidebarContent,
SidebarSection, SidebarItem, SidebarFooter,
} from "@grassroot/ui-react";
<Sidebar>
<SidebarHeader>Northwind</SidebarHeader>
<SidebarContent>
<SidebarSection title="Platform">
<SidebarItem icon={<div>GridIcon</div>} active count={38}>Services</SidebarItem>
<SidebarItem icon={<div>DeployIcon</div>}>Deploys</SidebarItem>
</SidebarSection>
</SidebarContent>
<SidebarFooter>Alex Mercer</SidebarFooter>
</Sidebar>

No translated snippet for this adapter yet.

No translated snippet for this adapter yet.

No translated snippet for this adapter yet.

ts
import { SidebarFooter, SidebarItem, SidebarSection, SidebarContent, SidebarHeader, Sidebar } from "@grassroot/ui-solid";
export function Example() {
return (
<>
<Sidebar
>
<SidebarHeader>Northwind</SidebarHeader>
<SidebarContent
>
<SidebarSection
title="Platform"
>
<SidebarItem icon={<div>GridIcon</div>} active count={38}>Services</SidebarItem>
<SidebarItem icon={<div>DeployIcon</div>}>Deploys</SidebarItem>
</SidebarSection>
</SidebarContent>
<SidebarFooter>Alex Mercer</SidebarFooter>
</Sidebar>
</>
);
}

Installation

bash
pnpm dlx grassroot add ui/sidebar
bash
npx grassroot@latest add ui/sidebar
bash
yarn dlx grassroot add ui/sidebar
bash
bunx grassroot add ui/sidebar

API Reference

SidebarProps
PropTypeDefault
widthRail width in px.number | undefined236