docscn

Type table

A table of props or fields that expand to show their details.

Prop

Type

Installation

npx shadcn@latest add @docscn/type-table

Usage

import { TypeTable } from "@/components/docs/components/type-table";

<TypeTable
  type={{
    title: {
      description: <>The card's title.</>,
      type: "ReactNode",
      required: true,
    },
    href: {
      description: <>Makes the card a link.</>,
      type: "string",
    },
  }}
/>

The docs block adds TypeTable to your MDX components.

Give the table an id to make each field linkable: a field gets the id {id}-{name}, and opening it updates the URL hash.

Props

Prop

Type

TypeNode

Prop

Type