App sidebar, flat


Install
npx shadcn add https://ui.klarhimmel.com/r/app-sidebar-flat.jsonDetailsAbout, usage, props and more
An app's side navigation as chrome beside every page: the product's name and up to twelve places in one list, with the signed-in person at the foot.
Import
Import
- app/sidebar-flat
- About
- An app's side navigation as chrome beside every page: the product's name and up to twelve places in one list, with the signed-in person at the foot. On a phone it folds into a menu.
- Category
- Interface sections for signed-in products. New project? Set it up once: /get-started/installation.
Notes
When to use it
An app's side navigation as chrome beside every page: the product's name and up to twelve places in one list, with the signed-in person at the foot. Use app-sidebar-grouped when places need headings.
Writing for it
- Write each place as the name of what the person finds there, in one or two words. - Set the current page to the label of one item so it is marked as where the person is. - Leave the signed-in name empty to drop the footer.
Watch out for
The landmark name is not shown but is what screen reader users hear, so give it a real name. On a phone the list folds into a menu.
Pairs well with
Usage
The block in a page, with its default content (long lists shortened). Every prop is in the table below.
Props
The type, default and text limit of every prop. On a real page, over-limit text is kept and checkSections flags it (Installation, Check a page before you ship); this live preview shows the default until it fits. The panel above edits all props.
| Prop | Type | Default | Description |
|---|---|---|---|
brand | string | 'Name the product' | Text, up to 30 characters. |
navLabel | string | 'Main navigation' | Text, up to 40 characters. |
items | { label, icon, href, badge }[] | 4 items | List of 1 to 12. Each item: label, icon ('zap' | 'shield' | 'layers' | 'globe' | 'sparkles' | 'clock' | 'code' | 'palette' | 'lock' | 'chart' | 'users' | 'mail' | 'heart' | 'rocket' | 'search' | 'settings' | 'check' | 'star' | 'book' | 'box' | 'cloud' | 'compass' | 'leaf' | 'gauge'), href, badge (optional). |
active | string | 'First page' | Text, up to 30 characters. |
account | string | 'Name the signed-in person' | Text, up to 40 characters. |