A scaled overview navigation component. Register waypoints in your content and render a minimap that lets users jump between sections.
import Minimap from "@radui/ui/Minimap"Example
Introduction
Start here for an overview of the page and what it covers.
Installation
Add the package and import the styles once at the root of your app.
Usage
Compose the parts you need. Each part exposes data attributes for styling.
API
Every part forwards its ref and accepts the props of the element it renders.
- Registers waypoints in long content and draws a scaled map of them
- Clicking a bubble scrolls its section into view
- Highlights the section currently in the viewport
- Works with any scroll container through Minimap.Provider
Import all parts of the component and piece them together.
Wraps both the waypoints and the minimap so they can share in-view state.
| Prop | Type | Default |
|---|---|---|
scrollable | boolean | false |
A button that scrolls to the matching waypoint. Exposes data-in-view while its waypoint is visible. Give it visible text or an aria-label.
| Prop | Type | Default |
|---|---|---|
value* | string | — |
Registers a section in the minimap.
| Prop | Type | Default |
|---|---|---|
value* | string | — |