Type table
Display structured property and type reference tables.
Use the TypeTable component to document object shapes, API responses, and component props in a structured table.
Pass a type object where each key is a field name and the value describes its type, description, and constraints:
<TypeTable
type={{
id: {
description: "Unique project identifier.",
type: "string",
required: true,
},
name: {
description: "Display name of the project.",
type: "string",
required: true,
},
slug: {
description: "URL-safe project slug.",
type: "string",
required: true,
},
customDomain: {
description: "Custom domain if configured.",
type: "string",
required: false,
},
createdAt: {
description: "ISO 8601 timestamp of project creation.",
type: "string",
required: true,
},
}}
/>When any field includes a default property, a Default column appears automatically:
<TypeTable
type={{
theme: {
description: "Color theme for the site.",
type: '"light" | "dark" | "system"',
default: '"system"',
required: false,
},
lang: {
description: "Default language for code blocks.",
type: "string",
default: '"plaintext"',
required: false,
},
toc: {
description: "Show a table of contents on each page."
Each field in the type object supports these properties: