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

endpoint

Endpoint

One API route. Start with a line like `POST /v1/graphs`, then a sentence, a parameter table (a bold name means required), and request and response code blocks. To list many routes in one table, use Sheet.

use it
Good for one API route: method, path, params, a response.
instead
Many routes in one place are Sheet. A shell session is Terminal.

one component

First line is the method and path. A table of params — bold name is required. Fences after it are the request and the response.

[ endpoint ]

GET/api/v1/components/:slug

One component from the catalog, with its props.

  • slug (required)string
    Registry slug, like graph-table

request

$ curl https://mdxcn.dev/api/v1/components/graph-meter

json

{ "slug": "graph-meter", "name": "GraphMeter", "props": [ … ] }
<Endpoint>

GET /api/v1/components/:slug

One component from the catalog, with its props.

| Param | Type | |
| --- | --- | --- |
| **slug** | string | Registry slug, like `graph-table` |

```bash
$ curl https://mdxcn.dev/api/v1/components/graph-meter
```

```json
{ "slug": "graph-meter", "name": "GraphMeter", "props": [ … ] }
```

</Endpoint>

install

command

[ PROPS ]
PropTypeDefaultDescription
titlestring"endpoint"Caption drawn on the top edge of the frame.
childrenMarkdown—Method and path, paragraphs, a table of name / type / description, fenced blocks.
methodstring—Or the first line of the children.
pathstring—Or the first line of the children.
params{ name, type?, description?, required? }[]—Data form of the table.
blocks{ label?, code }[]—Data form of the fences.
palette"mono" | "duo" | "multi""mono"mono is one accent plus muted. duo paints the second series with --graph-accent-2. multi cycles three accents.
cornerstring"+"Character at each corner of the frame.
frame"box" | "corners" | "rule" | "none""box"box draws the dashed border. corners keeps only the corner marks. rule draws dashed lines above and below. none drops the border and padding, and puts the title above the content.
classNamestring—Passed to the outer frame.