Skip to content

Docs Table

A reference table whose rows hang their descriptions off a button beside the name.

View source View as Markdown

A docs table lists names, types and values. A description sits behind the button beside its cell, so a long reference reads as a list of names rather than a wall of sentences.

PropTypeDefault
id
stringnone
options
MagicDrawerOptions{}

Usage

Write the table as front matter of the directive. Every cell is inline Markdown: code, links, strong and emphasis.

::docs-table
---
columns:
  - label: Prop
  - label: Type
rows:
  - items:
      - label: id
        description: Identifies the instance for `useMagicDrawer`.
      - label: string
---
::
KeyType
label
string
description
string
plaintext
boolean
escape
boolean

Markdown tables

A Markdown table renders as a docs table too. If its last column is headed Description, that column becomes the description of each row’s first cell.

| Variable | Default | Description |
| --- | --- | --- |
| `--docs-header` | `3.5rem` | The height of the header. |
VariableDefault
--docs-header
3.5rem