Skip to content

view on a desktop screen for a better experience.

endpoint

Endpoint

One API route. First line `POST /v1/graphs`, a sentence, a params table (bold name is required), then request and response fences. Many routes in one table are Sheet.

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": [ … ] }

MDX

<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.
classNamestring—Passed to the outer frame.