Navbar, dot rail


Install
npx shadcn add @klarhimmel/navbar-dot-railDetailsAbout, usage, props and more
No bar: a slim vertical column of dots on the right edge of its section, centred top to bottom, each a link whose label shows to the left on hover or focus.
Import
Import
- navigation/dot-rail
- header/dot-rail
- About
- No bar: a slim vertical column of dots on the right edge of its section, centred top to bottom, each a link whose label shows to the left on hover or focus. The current dot is filled in the accent colour.
- Category
- The bar at the top of every page: brand, links, one action. New project? Set it up once: /get-started/installation.
Notes
When to use it
Pick it for a long single page where a quiet column of dots on the right edge beats a bar, one dot per section. Pick navbar-sidebar for a full side menu with text, or navbar-simple for an ordinary top bar.
Writing for it
- Two to eight items, each label up to 40 characters. - Set current to the number of the dot that is the page now. - The rail name is read by screen readers only.
Watch out for
The rail sits at the right edge of its own section, so give that section the height of the area it should guide. Labels show only on hover or keyboard focus, so a touch visitor sees dots alone; keep section names obvious.
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 |
|---|---|---|---|
label | string | 'Name this navigation for screen rea…' | Text, up to 40 characters. |
items | Link[] | 4 items | List of 2 to 8. |
current | integer | 1 | Optional; empty is not rendered. |