Skip to content

Application

Outline drawer

A collapsible right-edge navigator: groups navigate, items jump to anchors, one group is open at a time. The same tree is reused on mobile inside a sheet.

import { OutlineDrawer, useScrollSpy, type OutlineNavGroup } from "@luc/ui/workspace";

Desktop: groups, items and the reading position

Collapse to a rail of group ordinals; expand to read the report contents. Scroll the page and the outline follows the section you are reading, until you choose one yourself.

Market performance

Sample section: Market performance. Scroll the page and the outline highlights the section you are reading.

Trend & momentum

Sample section: Trend & momentum. Scroll the page and the outline highlights the section you are reading.

Trend stack

Momentum

Weekly trend

Volatility & risk

Sample section: Volatility & risk. Scroll the page and the outline highlights the section you are reading.

Volume & liquidity

Sample section: Volume & liquidity. Scroll the page and the outline highlights the section you are reading.

Mobile: the same tree in a sheet

The same hierarchy, rendered without the collapsible rail.

Exports

Read from the published TypeScript API, so a prop that is not listed here does not exist and a default that is listed is the one the compiler sees.

Exported symbols
ExportKindSignature
OutlineDrawer15 documented props({ label, groups, open: openProp, defaultOpen, onOpenChange, expandedGroupId, pendingGroupId, activeItemId, activeSectionId, anchorHref, onSelectGroup, onSelectItem, collapsible, footer, className, }…
OutlineDrawerToggle3 documented props({ open, onOpenChange, label, }: { open: boolean; onOpenChange: (open: boolean) => void; label: string; }) => import("@types/react").JSX.Element

OutlineDrawer props

Type: OutlineDrawerProps

Values the compiler reads from the declaration.

OutlineDrawer props
PropTypeDefaultNotes
activeItemId?string | null | undefined—The active item id (usually from `useScrollSpy`).
activeSectionId?string | null | undefined—The section the active item belongs to, when the caller tracks both levels. The reading position is a *chart*; its section is the context around it. So a report outline marks the …
anchorHref?((id: string) => string) | undefined—Anchor id → href. Defaults to `#<id>`.
className?string | undefined—
collapsible?boolean | undefined—Whether the drawer can collapse. Default true.
defaultOpen?boolean | undefined—
expandedGroupId?string | null | undefined—The group shown expanded. Defaults to the first group with items.
footer?ReactNode—Extra content under the groups (a footer action row).
groupsreadonly OutlineNavGroup[]—The groups, in document order.
labelstring—Accessible name of the whole navigator (e.g. "Contents").
onOpenChange?((open: boolean) => void) | undefined—
onSelectGroup?((group: OutlineNavGroup) => boolean | undefined) | undefined—A group click; return `false` to let the browser follow the link.
onSelectItem?((id: string) => boolean | void) | undefined—An item click, e.g. to lock the scrollspy before the jump lands. Return `false` to take the jump over (the caller scrolls with the right offset and acknowledges the landing); anyt…
open?boolean | undefined—Controlled open (expanded) state.
pendingGroupId?string | null | undefined—The group the reader just picked, before its page has loaded. A domain switch is a server navigation; the navigator highlights the pick optimistically (`aria-current` + `data-pend…

OutlineDrawerToggle props

Type: { open: boolean; onOpenChange: (open: boolean) => void; label: string; }

Values the compiler reads from the declaration.

OutlineDrawerToggle props
PropTypeDefaultNotes
labelstring—
onOpenChange(open: boolean) => void—
openboolean—
Luc UI v1.0OutlineDrawerdark theme