Skip to content
LoidoltTheme 0.11.1
Svelte 5

Component

TocPanel

A table of contents beside the page, or behind a button on narrow screens.

import { TocPanel } from '@loidolt/theme-docs';

Example

Prepare the file

Export vectors at 1:1 and close every cut path.

Choose a material

Only use stock from the approved shelf.

Run the job

Frame the job, start the extraction, then start the cut.

Notes

  • Both forms render on the server and CSS picks one by width, so nothing jumps on load. Following a link closes the drawer.

Props

Generated from the component source, so it cannot drift from the implementation.

TocPanel props
PropTypeDefaultNotes
items required TocItem[]—
activeId bindablestring | nullnullThe heading being read. Bindable.
class string—
closeLabel string—
container HTMLElement | nullnullWhere the headings are; see TableOfContents.
offset number—
openLabel string'On this page'On narrow screens the contents open from a button with this label.
ref bindableHTMLDivElement | nullnull
title string'On this page'

Plus the attributes of HTMLAttributes<HTMLDivElement>, forwarded to the root element.