Back to showcase

Layout Components

Structural components that define page shells and layout regions. These are used via layout files, not directly in markdown.

ThreePanelLayout

Three-panel layout: sidebar (inherited) + main content + code examples panel. Used by ApiLayout for endpoint pages.

Sidebar
Content (~55%)
Code Panel (~45%)
PropTypeDescription
childrenSnippetMain content area (center panel)
codeExamplesSnippet?Code examples panel (right side on xl+)
Usage in layout
<ThreePanelLayout>
  {#snippet children()}
    <h1>Endpoint title</h1>
    <ParameterList parameters={params} />
  {/snippet}
  {#snippet codeExamples()}
    <CodeTabs examples={codeExamples} />
  {/snippet}
</ThreePanelLayout>

TableOfContents

"On this page" sidebar navigation showing heading anchors with active state tracking.

PropTypeDescription
itemsTocItem[]Array of heading items with id, text, level, children
activeIdstring?Currently active heading id

Sidebar

Responsive navigation sidebar with collapsible sections. Renders as a drawer on mobile, fixed panel on desktop. Automatically generated from content files in the API section.

PropTypeDescription
sectionsNavSection[]Navigation sections with items
activePathstringCurrent active URL path
openboolean?Mobile drawer open state
onclose() => voidCallback when mobile drawer closes

TopBar

Fixed header with logo, section tabs (Docs, Get Started, API Reference), search trigger, and theme toggle. Rendered in the root layout.

PropTypeDescription
onMenuClick() => voidCallback for mobile hamburger menu click

Footer

Site footer with copyright and navigation links. Takes no props — reads from siteConfig.