# SectionBar

> A sticky row of chips linking to the sections of one long page, such as a menu's categories or a product's specs.

```ts
import { SectionBar } from "@sdxc/ui";
```

Renders the bar: a `<nav>` holding a sideways-scrolling row of chip links, the first one
marked current until the island reads the scroll.

## Examples

```tsx
<SectionBar id="menu-bar" label="Menu categories" top="4rem" items={[{ id: "tacos", label: "Tacos", count: 3 }]} />
```

## Props

| Prop | Type | Description |
| --- | --- | --- |
| `id` | `string` | The bar's `id`, unique on the page; its island finds the bar by it. |
| `label` | `string` | The landmark's name, such as "Menu categories". |
| `items` | `Item[]` |  |
| `top?` | `string` | Where the bar sticks, as a CSS length from the top of the viewport, such as the height of a sticky top bar above it. Each section gives itself a `scroll-margin-top` of at least this plus the bar's own height, so a jump lands below the bar. |

Also accepts everything in `Omit<TagProps<"nav">, "children">`.

