Skip to main content

Configuration

The plugin itself takes a single option; most configuration happens on the components.

Plugin options​

OptionTypeDefaultDescription
enabledbooleantrueToggle the plugin without removing it from plugins.

<Marginalia>​

Container establishing the two-column reading layout. Toggles body.marginalia-active on mount, which hides Docusaurus's native TOC column so the in-margin TOC and cards have room to breathe.

PropTypeDefaultNotes
showTocbooleantrueSticky "On this page" list + scroll progress bar in gutter

<Aside>​

Inline anchor paired with a margin card.

PropTypeDefaultNotes
anchorReactNodechildrenInline text in prose (if omitted, children is used as the anchor)
titlestring—Card heading
kindAsideKind'note'One of note, concept, warning, info, link, value, code, endpoint — drives the swatch color
kindLabelstringderived from kindOverride the uppercase label
metastring[]—Pill tags shown below body
ctastring—Call-to-action text at bottom of card
ctaHrefstring—CTA href. If omitted, renders as <span>
childrenReactNode—Card body (when anchor is set) or inline anchor (when not)

<Endpoint>​

Inline method + path chip for API docs.

PropTypeDefaultNotes
methodHttpMethod'GET'Uppercased automatically
pathstring—The URL path
childrenReactNode—Falls back when no path prop is provided

Method colors: GET green, POST amber, PUT / PATCH accent, DELETE red.

TypeScript​

import type { MarginaliaOptions, AsideKind, HttpMethod } from 'docusaurus-plugin-marginalia';