Skip to content

Track Contents

Pro

The headings of a long page on one track that bends with each level. The part you read is solid, and a dot moves to the current heading.

  • Base UI
  • Motion
  • React 19
  • Tailwind CSS 4

Added Nov 9, 2026 · Pro license

Playground

Loading the preview

Props

Needs your Pro API key in GELATIN_UI_PRO_TOKEN. Set it up

Pro itemAPI key required

Track Contents needs a Pro API key

Try the live preview for free. With Pro, the add command above puts the source in your project.

Files it adds
16
More Pro items, one API key
+327
Your coding agent runs it
1 cmd

$79$129once, for life

Already have Pro? Sign in to set up your API key.

Put the links in nested lists, and the track last in the outer list.

docs-contents.tsx

TrackContents

<div>
PropTypeDefaultDescription
aria-labelstring—Defines a string value that labels the current element. The name of the landmark for screen readers. Default "On this page". Translate it.
valuestring | null—The id of the current heading (controlled). Use with onValueChange.
defaultValuestring | null—The id that is current on the first paint, until the box scrolls or a click (uncontrolled).
onValueChange—Called with the new heading id on scroll and on a link click.
offsetnumber—The height in px of a sticky header over the scroll box (default 0). Give the headings the same scroll-margin-top, so a jump to a hash lands under the header.
rootElement | null—The scroll box that holds the headings, if it is not the page (an element, not a ref).
nodesbooleanfalseDraws a 5px dot on the track for each heading: hollow ahead, faint when read, full in view.
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

TrackContentsTitle

<div>
PropTypeDefaultDescription
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

TrackContentsList

<div>
PropTypeDefaultDescription
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

TrackContentsItem

<div>
PropTypeDefaultDescription
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

TrackContentsLink

<div>
PropTypeDefaultDescription
From Base UIUseRenderBase UI docs
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

TrackContentsTrack

<li>
PropTypeDefaultDescription
...props<li> attributes—Every other attribute goes to the <li>, with a ref.
  • Put a TrackContentsTrack last in the outer TrackContentsList.
  • Nest a TrackContentsList in an item for sub-headings: the track bends in.
  • Set nodes to show a dot for each heading.
TabMoves to the next heading link.
EnterGoes to the heading.
Range and dot
glide · the range and the dot move along the track to the headings in view

Built with

Installs with Track Contents

  1. AddedTrack Contents, with Table of Contents.
Open the release