DocsComponentsLayout
Sidebar
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/sidebarbash
npx grassroot@latest add ui/sidebarbash
yarn dlx grassroot add ui/sidebarbash
bunx grassroot add ui/sidebarAPI Reference
| Prop | Type | Default |
|---|---|---|
widthRail width in px. | number | undefined | 236 |