> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blode.md/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# 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.

## Basic usage

Pass a `type` object where each key is a field name and the value describes its type, description, and constraints:

```mdx
<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,
    },
  }}
/>
```

- `id` (type: string, required: true): Unique project identifier.
- `name` (type: string, required: true): Display name of the project.
- `slug` (type: string, required: true): URL-safe project slug.
- `customDomain` (type: string, required: false): Custom domain if configured.
- `createdAt` (type: string, required: true): ISO 8601 timestamp of project creation.

## With default values

When any field includes a `default` property, a Default column appears automatically:

```mdx
<TypeTable
  type={{
    appearance: {
      description: "Initial color mode for the site.",
      type: '"system" | "light" | "dark"',
      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.",
      type: "boolean",
      default: "true",
      required: false,
    },
  }}
/>
```

- `appearance` (type: "system" | "light" | "dark", required: false, default: "system"): Initial color mode for the site.
- `lang` (type: string, required: false, default: "plaintext"): Default language for code blocks.
- `toc` (type: boolean, required: false, default: true): Show a table of contents on each page.

## Field options

Each field in the `type` object supports these properties:

- `description` (type: string, required: false): Human-readable explanation of the field.
- `type` (type: string, required: false): The field's type annotation.
- `required` (type: boolean, required: false): Whether the field is required. Defaults to the inverse of `optional`.
- `optional` (type: boolean, required: false): Whether the field is optional. Inverse of `required`.
- `default` (type: string, required: false): Default value shown in the table.