Valyro Русская версия

Page Minimap

Schematic map of a long page with the visible area. Free, MIT · Interactive blocks › Interactive explainers

A schematic map of a long page: its sections as blocks to scale and the visible area as a frame. Pick a section to jump to it under the fixed header, drag the frame, or use the position slider. Only the registered sections are measured, once per frame; nothing of the page is cloned.

Installation

npx valyro-cli@latest add page-minimap
npx shadcn@latest add https://valyro.xyz/r/page-minimap.json
npm install valyro-ui

import 'valyro-ui/styles.css';
import { PageMinimap } from 'valyro-ui';

Props

PropTypeDefault
sections *MinimapSection[]The sections, in document order.
scrollContainerHTMLElement | nullnullThe element that scrolls; null (default) means the page itself.
maxHeightnumber320Upper limit of the map's height, px. Default 320; it is also kept within the screen.
headerOffsetnumber0Height of a fixed header over the content, px: jumps land below it. Default 0.
hideWhenFitsbooleantrueHide the map when everything fits without scrolling. Default true.
placement'inline' | 'fixed''inline'inline (default) in the flow, or fixed to the inline end of the screen.
onActiveChange(id: string | null) => voidCalled when the section the reader is in changes.
onNavigate(id: string) => voidCalled when the reader picks a section in the map.
labelsPartial<PageMinimapLabels>Overrides for the built-in English text; keys left out keep their defaults.

Related components

  • Feature Hotspots — Numbered points on an image that open a note about each detail
  • Exploded Layers — Prepared image layers pulled apart with captions
  • Prediction Card — The reader guesses first, then sees the answer and the explanation
  • Detail Dial — Choose how deep an explanation goes: short, detailed or full
  • Version Scrubber — Step through prepared versions of a design with one slider
  • Peel Sticker — A sticker you peel back by its corner to reveal what is under it
  • Scratch Reveal — Scratch off a cover to reveal text or a picture
  • Tear-off Ticket — A ticket whose stub tears off along the perforation
  • Split-Flap Board — Mechanical departure board: only the changed characters flip
  • Swipe Action Card — Swipe a card sideways to reveal its actions
  • Sticker Board — A free composition of photos, stickers and notes to move and rotate
  • Lasso Select — Drag a rectangle to select a group of cards

Previous: Version Scrubber · Next: Peel Sticker · All Interactive blocks