/docsv0.1.0

Components

Built-in MDX components from @wrksz/docs/typography with live examples.

Passing typography to <Body components={typography} /> makes every built-in component available in .mdx files without explicit imports.

Callout

Highlight notes, tips, and warnings. By default only the icon carries the tone color; set variant="tinted" to tint the card surface too.

Available type values: note (default), info, tip, warning, danger.

Install

Renders install commands for every package manager in the active registry. The reader's selected manager is persisted in localStorage and shared across all <Install> blocks and the home page.

CodeGroup

Turns adjacent fenced code blocks into a single tabbed code frame. Each tab uses the fence's title="..." (falling back to the language name), and the copy button copies whichever tab is active.

Tabs

General-purpose tabbed content for prose, code, or mixed blocks.

Use npm from @wrksz/docs for JavaScript and TypeScript packages.

Steps

Numbers ### headings into a vertical step-by-step guide.

Create the source

Point createSource at your content/docs folder.

Render the page

Mount DocsPage, PageHeader, Prose, and PageFooter in app/docs/[[...slug]]/page.tsx.

Props

Documents component props or configuration options with type, default value, and required, deprecated, or since badges.

dirstringrequired

Path to the MDX content directory.

baseUrlstringDefault "/docs"

URL prefix for generated docs routes.

legacybooleandeprecated

Deprecated option example.

Cards

Link cards for navigation and next-step grids.

Details

A native <details> disclosure for collapsible notes. Works without JavaScript and expands automatically on browser find-in-page.

How does search indexing work?

DocsRoot receives the page list from source.pages() on the server and passes it to the @wrksz/cue command palette, so search works instantly on the client without an external index.

Do, Dont, and Pairs

Contrast recommended and discouraged patterns with <Do> / <Dont> blocks or compact <Pairs> rows.

DoCalling createSource in a Server Component

src/app/docs/layout.tsx

Don'tImporting createSource from a client module

src/components/nav.tsx
Leaving baseUrl out of sync between createSource and withDocs
Use the same baseUrl in both places so .md rewrites match.

Badge

Inline status or version label with neutral (default), info, success, warning, or danger tones.

Added in v0.1, status new, stable, beta, or breaking.

Image

Theme-aware images with an optional caption and a built-in full-screen zoom viewer (+, -, 0, or click to zoom). Standard Markdown images (![alt](src)) use the same component automatically.

Light and dark images swap via CSS on the first paint.

AgentPrompt

Provides a copyable prompt and one-click deep links into configured AI agents. Write the prompt inside a fenced code block; {origin}, {page}, {llms}, and {llms-full} are expanded automatically.

Ask an agent about components

Open this page's Markdown directly in a chat.

ClaudeChatGPT
Show prompt
Read https://docs.wrksz.dev/docs/guides/components.md and show me how to build a guide page using Steps, CodeGroup, and Callout.