# Navbar, dot rail

- **[Sections](/blocks/)**
- **[Navigation](/blocks/navigation/)**
- **Navbar, dot rail**

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

- **CLI**

  ```
  npx shadcn add @klarhimmel/navbar-dot-rail
  ```
- **Import**

  ```
  import Block from '@/components/klarhimmel/blocks/navbar-dot-rail';
  ```

Also called

- 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

- **[Hero, card cover](/blocks/hero/card-cover)**
- **[Navbar, simple](/blocks/navigation/simple)**

## Usage

The block in a page, with its default content (long lists shortened). Every prop is in the table below.

section.tsx

```
import { Theme } from '@/components/klarhimmel/theme/style';
import { BlockSurface } from '@/components/klarhimmel/blocks/surface';
import NavbarDotRail from '@/components/klarhimmel/blocks/navbar-dot-rail';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <NavbarDotRail props={{
          "label": "Name this navigation for screen readers",
          "items": [
            {
              "label": "First page",
              "href": "#first"
            },
            {
              "label": "Second page",
              "href": "#second"
            },
            {
              "label": "Third page",
              "href": "#third"
            },
            {
              "label": "Fourth page",
              "href": "#fourth"
            }
          ],
          "current": 1
        }} />
      </BlockSurface>
    </Theme>
  );
}
```

## 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.

- **label**: Text, up to 40 characters.
- **items**: List of 2 to 8.
- **current**: Optional; empty is not rendered.

[Previous](/blocks/navigation/corners)

[Next](/blocks/navigation/menu)
