Skip to content
wdj

Table of contents

Implemented Navigation

Page section navigation tree with active link indicator.

Kumo reference: kumo-ui.com/components/table-of-contents/

Presentation commands show demo feedback. Read the interaction guide to connect real actions.

Basic

Show template
{% load wdj %}
<div class="w-48 max-w-full">{% include 'wdj/components/table_of_contents.html' with items=audit_toc_basic only %}</div>

Interactive

Show template
{% load wdj %}
<div class="w-48 max-w-full">{% include 'wdj/components/table_of_contents.html' with items=audit_toc_interactive only %}</div>

Groups

Show template
{% load wdj %}
<div class="w-48 max-w-full">{% include 'wdj/components/table_of_contents.html' with items=audit_toc_groups only %}</div>

Nested sections

Show template
{% load wdj %}
{% include "wdj/components/table_of_contents.html" with items=toc_items only %}

Custom title

Show template
{% load wdj %}
{% include "wdj/components/table_of_contents.html" with items=toc_items title="Guide contents" only %}

Flat sections

Show template
{% load wdj %}
<div class="w-48 max-w-full">{% include "wdj/components/table_of_contents.html" with items=audit_toc_none only %}</div>

Active section

Show template
{% load wdj %}
{% include "wdj/components/table_of_contents.html" with title="Active section" items=toc_active only %}

Long titles

Show template
{% load wdj %}
{% include "wdj/components/table_of_contents.html" with title="Long titles" items=toc_long only %}

Compact panel

Show template
{% load wdj %}
{% include "wdj/components/table_of_contents.html" with title="Compact panel" items=toc_flat class="max-w-48" only %}

Without title

Show template
{% load wdj %}
<div class="w-48 max-w-full">{% include "wdj/components/table_of_contents.html" with hide_title=True items=audit_toc_short only %}</div>

Live scroll tracking

Overview

Build server-rendered interfaces with semantic components. Reuse the documented tokens, layouts and interaction patterns. Keep native controls and meaningful links throughout your application.

Installation

Install the package and serve the bundled assets. Load the template tags and choose components that match the task. Review the installation guide for the complete Django setup.

Usage

Pass context explicitly and use HTML slots for rich content. Use HTMX for server-owned actions and Alpine for local state. Verify keyboard navigation and narrow layouts before sharing a screen.

API

Each component page lists the supported template parameters. Copy a working example and supply your own data. Labels and native form values remain available to the application.

Show template
{% load wdj %}
<div class="grid w-full max-w-xl grid-cols-1 gap-6 sm:grid-cols-[10rem_minmax(0,1fr)]">
  {% include 'wdj/components/table_of_contents.html' with items=audit_toc_scroll_items scrollspy=True scroll_root='#toc-scroll-content' scroll_offset=8 track_hash=False only %}
  <div id="toc-scroll-content" tabindex="0" role="region" aria-label="Scrollable guide" class="h-64 min-w-0 overflow-y-auto rounded-lg border border-kumo-hairline p-4">
    <section id="toc-scroll-overview" class="mb-6"><h3 class="mb-2 text-base font-semibold">Overview</h3><p class="text-base text-kumo-subtle">Build server-rendered interfaces with semantic components. Reuse the documented tokens, layouts and interaction patterns. Keep native controls and meaningful links throughout your application.</p></section>
    <section id="toc-scroll-install" class="mb-6"><h3 class="mb-2 text-base font-semibold">Installation</h3><p class="text-base text-kumo-subtle">Install the package and serve the bundled assets. Load the template tags and choose components that match the task. Review the installation guide for the complete Django setup.</p></section>
    <section id="toc-scroll-usage" class="mb-6"><h3 class="mb-2 text-base font-semibold">Usage</h3><p class="text-base text-kumo-subtle">Pass context explicitly and use HTML slots for rich content. Use HTMX for server-owned actions and Alpine for local state. Verify keyboard navigation and narrow layouts before sharing a screen.</p></section>
    <section id="toc-scroll-api" class="mb-6"><h3 class="mb-2 text-base font-semibold">API</h3><p class="text-base text-kumo-subtle">Each component page lists the supported template parameters. Copy a working example and supply your own data. Labels and native form values remain available to the application.</p></section>
    <div class="h-40" aria-hidden="true"></div>
  </div>
</div>

API Reference

Prop Type Default Description
string unset Title; pass the documented value shown in the examples.
bool False Hide title; pass the documented value shown in the examples.
list[dict] [] title (or label), optional href/active/children. Groups without href have plain labels; leaves without href render keyboard-accessible buttons. Children support the same recursive contract.
string / HTML slot unset Rich HTML supplied by the wdj_component block tag, rendered in an isolated context.
bool False TableOfContents: track sections within this navigation only; disabled by default for presentational examples.
string unset Optional CSS selector for the scroll container. Omit to track the viewport.
number 0 Activation and scrolling offset in pixels, default 0. Match a fixed header or scroll-container padding.
bool True Read the initial hash/hashchange and update the fragment on navigation; default True. Set False for an isolated scroll example.
dict {} Dictionary of escaped native, HTMX or Alpine attributes. Literal Tailwind classes only.
string "" Class; pass the documented value shown in the examples.

Accessibility notes

Every interactive component keeps real semantics and keyboard support: native controls where possible, ARIA only where necessary, and a visible focus ring. See the Accessibility page for the shared contract.

Read the accessibility contract

Components

Components overview
AutocompleteFree-form input with local or HTMX-filtered suggestions.
BadgeSolid, tinted, outline and dot status labels.
BannerInline message bar with variants and optional action.
BreadcrumbsTrail navigation in two sizes.
ButtonVariants, sizes, shapes, icons and loading state.
ButtonGroupJoins a small set of tightly-coupled buttons into a single control (split buttons).
CheckboxSingle checkbox and indeterminate state.
ClipboardTextRead-only text field with a one-click copy-to-clipboard button.
Code / CodeHighlightedEscaped Pygments grammar highlighting, multiline tokens, line numbers, highlighted lines and localized copying.
CollapsibleComposable disclosure component for showing and hiding content.
Combobox / AutocompleteKumo-styled input/button triggers, search inside the popup, grouped local choices and debounced HTMX search.
CommandPaletteAccessible spotlight search overlay with Cmd+K keyboard shortcut.
DatePickerKumo-styled date and datetime popups; inline single, multiple and range calendars with bounds/presets.
DateRangePickerStyled popup or inline range calendar with bounds, presets and separately named form values.
DialogNative <dialog> modal with focus management.
DrawerEdge-anchored modal panel. LayerDialog has its own layered component.
DropdownMenuNative details menu with delegated keyboard navigation and dismissal.
EmptyEmpty-state placeholder with icon and action.
FieldLabel + description + error wrapper. Built into each control.
FlowDirected diagrams with branches, SVG connectors, custom anchors and responsive local scrolling.
GridResponsive CSS grid layout container with preset column configurations.
InlineCopyTextCompact borderless copy control for IDs and short values.
InputText field with label, description, leading/trailing icons.
InputAreaMulti-line textarea with auto-resize option.
InputGroupInput field with seamless prefix, suffix, and addon attachments.
LabelForm field label, optional marker and tooltip.
LayerCardCompound surface card with distinct primary and secondary layers.
LayerDialogLayered native modal with actions, forms, nested dialogs and pending states.
LinkInline, current and plain text links.
LoaderAnimated spinner in three sizes.
MenuBarCompact view selector using native radio semantics.
MeterProgress bar showing a measured value within a known range.
PaginationA page navigation component for navigating through paginated content.
PopoverAnchored popup with interactive content.
RadioRadio group, vertical and horizontal.
SelectKumo-styled Alpine dropdown with groups, rich options and multiple selection; native form values and fallback.
SensitiveInputPassword/secret input with reveal toggle and copy button.
SeparatorHorizontal / vertical rules with optional label.
SidebarRecursive navigation groups, account/zone views, search, loading, resize and full-screen mobile breadcrumbs.
SkeletonShimmer placeholder.
SliderInset single/range selection with vertical grips, value badges, endpoint labels and native keyboard/form behavior.
SurfaceBordered surface panel with header slot.
SwitchOn/off toggle in three sizes.
TableServer-driven table: sort, filter, select and paginate the full dataset.
Table of contentsPage section navigation tree with active link indicator.
TabsSegmented and underline tabs with a sliding indicator, responsive overflow and local Alpine or URL/HTMX state.
TagInputMulti-value badge input for tags and recipients.
TextHeading, body, secondary, success, error and mono text.
ToastyExpandable notification stack with variants, paused expiry and a live region.
ToolbarCompact grouped controls with shared borders, composed filters and keyboard arrow navigation.
TooltipHover and focus tooltip with grouped delays, Escape dismissal and viewport bounds.
↑ ↓ Navigate ↵ Select