Skip to content
mdxcn is now part of Shadcn Labs. details

installation

There's no npm package to install. The shadcn CLI copies each component's source into your project, and the only dependency it adds is motion. After that, you write ordinary Markdown inside the component's tag. Where MDX doesn't render, like a README, you paste the plain-text version instead.

mdx

Register each component once in mdx-components.tsx. After that, the lists and tables you write inside its tag need no imports. On every docs page, the .mdx tab shows what you write and the .md tab shows the plain-text figure for Notion or a README.

[ tip ]
Wrap your component map in withMdxcn. Some docs frameworks replace tags like ul and table with their own components, and the wrapper lets mdxcn read those too.
[ mdx ]
  1. copy the files

    Run the CLI command below, or copy them from GitHub.

  2. register the component

    Add it to mdx-components.tsx. You only do this once.

  3. write Markdown inside the tag

    The .mdx tab on each docs page shows exactly what to type.

agents

With the skill installed, an agent drops in a figure instead of drawing an SVG. It writes Markdown inside the tag in MDX, the plain-text figure in a README, a ::graph-* block in Comark, and a graph_* filter in Knap.

For agents explains how writing and reading back work. Skill covers installing it, and /llms.txt puts the graph guide and every format in a single file.

one component

The CLI copies the component and the shared frame code into registry/default. If you'd rather do it by hand, the manual tab lists every file to copy from GitHub.

command

everything

Installs every graph and the shared frame code into registry/default. That includes graph-comark and graph-knap, the adapters for Comark and Knap.

command

namespace

Add the registry to components.json once. From then on you can install components by name, like @mdxcn/graph-table.

cli

components.json

then

import

Components land under @/registry. If the import path feels long, add a barrel file that re-exports the ones you use.

import