Type Table
Write an API reference from a manual map of properties and types.
TypeTable renders a manually authored property map, following the Fumadocs-style type API. It is built into .mdx pages—no imports are required. Use it when you want to document an API without reading a TypeScript source file; use Auto Type Table for build-time generation from an interface or type alias.
Live demo
The map keys become property names. Type and default values are display strings, not executable code. Descriptions can include JSX for links, emphasis, and inline code.
labelRequiredstring
variant"quiet" | "strong"
- Default
"quiet"
disabledboolean
- Default
false
textDeprecatedstring
label instead.<TypeTable
caption="Button props"
type={{
label: {
type: "string",
description: <>Text shown inside the button.</>,
required: true,
},
variant: {
type: '"quiet" | "strong"',
description: <>Choose the visual treatment. See <a href="/theming">Theming</a>.</>,
default: '"quiet"',
},
disabled: {
type: "boolean",
description: <>Prevent interaction without hiding the button.</>,
default: "false",
},
text: {
type: "string",
description: <>Use <code>label</code> instead.</>,
deprecated: true,
},
}}
/>Props
typeRequiredRecord<string, TypeTableProperty>
captionstring
Row definition
Each value in the type map supports these fields:
typeRequiredstring
descriptionstring | JSX.Element
defaultstring
requiredboolean
- Default
false
deprecatedboolean
- Default
false
The compact summary shows the Prop and Type. Expand a row to read its description and default. Row definitions do not infer whether a property is optional or deprecated: set the badges explicitly. A default documents a value; it does not change the behavior of the API you are describing.
Rows use native disclosures: focus a summary and press Enter or Space to toggle it. Expansion and collapse use the same animation as accordions and respect reduced motion. On narrow screens, the type wraps beneath the property name rather than forcing horizontal scrolling. The rounded container has a muted background and subtle border; closely spaced rows blend into it when collapsed and show a border only when open.
