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)
titlestringCard 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
ctastringCall-to-action text at bottom of card
ctaHrefstringCTA href. If omitted, renders as <span>
childrenReactNodeCard body (when anchor is set) or inline anchor (when not)

<Endpoint>

Inline method + path chip for API docs.

PropTypeDefaultNotes
methodHttpMethod'GET'Uppercased automatically
pathstringThe URL path
childrenReactNodeFalls 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';