Skip to content

Outline

Use Outline to navigate a long conversation or document from a narrow rail at its edge, which takes almost no width until it is hovered or focused. For a classic “On this page” list that is always readable, use Anchor.

Outline is a compact edge-mounted navigation rail modeled on conversation and workspace outlines. At rest it occupies only a narrow strip of horizontal ticks so content keeps its full width; on pointer hover or keyboard focus it expands in place into a floating card showing single-line summaries, metadata, and optional preview tooltips, jumping on click.

Use targetId + offsetTarget to track DOM scroll position automatically like Anchor, or drive value + onSelect directly when pairing with VirtualList where off-screen items are not mounted in the DOM.

Demos

Conversation Outline

Each milestone or user prompt becomes a tick: emphasized highlights the current user’s own turns at rest, meta renders the timestamp, and tooltip previews the full prompt beside the floating row. Scrolling updates and auto-centers the active Jade tick; hovering the right rail opens the jump card.

Hierarchy, Placement & Pinned Card

Pass depth to indent nested sections, switch sides with placement="left", or pin the floating card open with controlled show.

Controlled & Virtualized Feeds

Omit targetId to control Outline purely via value, onUpdateValue, and onSelect—ideal for calling listRef.current?.scrollTo({ key }) on a VirtualList.

Outline Props

NameTypeDefaultDescriptionVersion
itemsreadonly OutlineItem[]Ordered outline entries; renders nothing when empty.Unreleased
valuestring | nullundefinedControlled active item key.Unreleased
defaultValuestring | nullnullInitial active item key when uncontrolled.Unreleased
onUpdateValue(value: string | null) => voidundefinedCalled whenever scroll-spy or selection changes the active key.Unreleased
onSelect(key: string, item: OutlineItem) => voidundefinedCalled when a compact tick or floating card row is clicked.Unreleased
placement'right' | 'left''right'Edge the rail sits on; the floating card opens inward.Unreleased
showbooleanundefinedControlled visibility of the floating card.Unreleased
defaultShowbooleanfalseInitial visibility of the floating card when uncontrolled.Unreleased
onUpdateShow(show: boolean) => voidundefinedCalled when hover, keyboard focus, Escape, or outside clicks open or close the card.Unreleased
closeOnSelectbooleanfalseClose the floating card immediately after clicking an item.Unreleased
maxVisibleItemsnumber10Maximum visible rows in the floating card before its ScrollArea scrolls.Unreleased
maxRailHeightnumber | string240Maximum height of the compact tick strip before auto-centering scroll kicks in.Unreleased
boundnumber24Distance in px from the scroll container’s top at which a targetId counts as reached.Unreleased
ignoreGapbooleantrueKeep the last passed item active across gaps between targets.Unreleased
offsetTargetOutlineOffsetTargetwindowScroll container for targetId scroll-spy and smooth scrolling (selector, element, ref, or getter).Unreleased
zIndexnumberundefinedFixed z-index for the floating card instead of automatic overlay stacking.Unreleased
aria-labelstringLocale Outline.labelAccessible name of the nav landmark ("Outline" by default).Unreleased

OutlineItem

NameTypeDefaultDescription
keystringUnique identifier matched against value and passed to onSelect.
labelReactNodeSingle-line summary in the floating card; string labels also name the compact tick button.
textValuestringundefinedPlain-text accessible name for the compact tick when label is non-string JSX.
metaReactNodeundefinedTrailing metadata in the floating card (for example a timestamp or turn number).
tooltipReactNode | (() => ReactNode)undefinedRich preview tooltip displayed beside the floating row on hover.
targetIdstringundefinedTarget element id (with or without #) inside offsetTarget.
emphasizedbooleanundefinedRenders a stronger tick at rest (e.g. for the current user’s own turns or top-level headings).
depthnumber0Nesting depth (0, 1, 2…); nested items draw shorter ticks and indented card labels.