Components

SuperDocs comes with a set of built-in components to make your documentation richer. These are available globally in all .mdx files — no imports needed.


Card

A simple card component for links or highlights.

<Card title="Getting Started" icon="🚀" href="/getting-started/installation">
Learn how to install and configure SuperDocs.
</Card>
🚀

Getting Started

Learn how to install and configure SuperDocs.

PropTypeDescription
titlestringThe card title.
iconstringIcon or emoji (optional).
hrefstringURL to link to (optional). Makes the card clickable.

CardGroup

A layout component to display Cards in a responsive grid.

<CardGroup>
<Card title="Installation" icon="📦" href="/getting-started/installation">
Get up and running quickly.
</Card>
<Card title="Configuration" icon="⚙️" href="/reference/configuration">
Customize your docs site.
</Card>
</CardGroup>

Tabs

Organize content into switchable tabs.

<Tabs>
<Tab title="npm">
npm install superdocs
</Tab>
<Tab title="yarn">
yarn add superdocs
</Tab>
<Tab title="pnpm">
pnpm add superdocs
</Tab>
</Tabs>
Terminal window
npm install superdocs
Terminal window
yarn add superdocs
Terminal window
pnpm add superdocs

Accordion

Collapsible content sections for FAQs or optional details.

<Accordion title="What is SuperDocs?" icon="">
SuperDocs is an open-source documentation generator built on Astro.
</Accordion>
<Accordion title="Is SuperDocs free?" defaultOpen>
Yes! SuperDocs is completely free and open-source.
</Accordion>
What is SuperDocs?

SuperDocs is an open-source documentation generator built on Astro.

Is SuperDocs free?

Yes! SuperDocs is completely free and open-source.

PropTypeDefaultDescription
titlestring-The accordion header text.
iconstring-Optional icon/emoji.
defaultOpenbooleanfalseWhether the accordion starts expanded.

Steps

Display numbered step-by-step instructions.

<Steps>
<Step title="Install SuperDocs">
Run `npx superdocs create my-docs` to create a new project.
</Step>
<Step title="Configure">
Edit the `docs-config.json` file to customize your site.
</Step>
<Step title="Deploy">
Push to GitHub and deploy with Vercel or Netlify.
</Step>
</Steps>

Install SuperDocs

Run npx superdocs create my-docs to create a new project.

Configure

Edit the docs-config.json file to customize your site.

Deploy

Push to GitHub and deploy with Vercel or Netlify.

ComponentPropTypeDescription
Steps--Container for Step items.
SteptitlestringOptional step title.

Callout

Enhanced alerts/admonitions with different types.

<Callout type="note" title="Note">
This is a note callout with helpful information.
</Callout>
<Callout type="tip">
Pro tip: Use callouts to highlight important info!
</Callout>
<Callout type="warning" title="Warning">
Be careful with this operation.
</Callout>
Note

This is a note callout with helpful information.

Tip

Pro tip: Use callouts to highlight important info!

Warning

Be careful with this operation.

Danger

This is a danger callout for critical warnings.

PropTypeOptionsDescription
typestringnote, tip, info, warning, danger, checkThe callout type.
titlestring-Override the default title.
iconstring-Override the default icon.

CodeGroup

Tabbed code blocks for showing code in multiple languages. Use the title attribute on code blocks to set tab names.

<CodeGroup>
```bash title="npm"
npm install superdocs
```
```bash title="yarn"
yarn add superdocs
```
</CodeGroup>

Badge

Inline status badges for labeling content.

<Badge>Default</Badge>
<Badge variant="success">Success</Badge>
<Badge variant="warning">Warning</Badge>
<Badge variant="danger">Deprecated</Badge>
<Badge variant="info">Beta</Badge>
Default Success Warning Deprecated Beta
PropTypeOptionsDescription
variantstringdefault, success, warning, danger, infoBadge color variant.

Tooltip

Hover tooltips for additional context.

The <Tooltip content="Application Programming Interface">API</Tooltip> is well documented.

The API Application Programming Interface is well documented.

PropTypeDescription
contentstringThe tooltip text shown on hover.

Frame

A styled container for images or videos with optional captions.

<Frame caption="Architecture diagram">
<img src="/architecture.png" alt="Architecture" />
</Frame>
PropTypeDescription
captionstringCaption text displayed below the content.

Columns

Create multi-column layouts.

<Columns cols={2}>
<Column>
**Left Column**
Content for the left side.
</Column>
<Column>
**Right Column**
Content for the right side.
</Column>
</Columns>

Left Column

Content for the left side.

Right Column

Content for the right side.

ComponentPropTypeOptionsDescription
Columnscolsnumber2, 3, 4Number of columns (default: 2).
Column---Individual column container.

GitHub-Style Alerts

SuperDocs also supports GitHub-style blockquote alerts:

> [!NOTE]
> This is a note.
> [!TIP]
> This is a helpful tip.
> [!IMPORTANT]
> Critical information here.
> [!WARNING]
> Be careful!
> [!CAUTION]
> Potential danger ahead.

Icon

Display icons from multiple icon sets powered by Iconify. Available globally in all MDX files.

Basic Usage

<Icon name="lucide:rocket" />
<Icon name="heroicons:home" size={24} />
<Icon name="mdi:github" class="text-primary-500" />

lucide:rocket

heroicons:home

mdi:github

fa6-brands:twitter

Available Icon Sets

Icon SetPrefixDescription
Lucidelucide:Clean, consistent stroke icons (recommended)
Heroiconsheroicons:Beautiful hand-crafted icons by Tailwind
Material Design Iconsmdi:Google’s Material Design icon set
Font Awesome Solidfa6-solid:Font Awesome 6 solid icons
Font Awesome Brandsfa6-brands:Font Awesome 6 brand icons

Props

PropTypeDefaultDescription
namestring-Icon name in set:icon-name format.
sizenumber | string24Icon width and height in pixels.
classstring-Additional CSS classes.
aria-hiddenbooleantrueHide from screen readers.

Sidebar groups automatically get icons based on their label. You can also specify custom icons in your navigation config:

Group LabelDefault Icon
Getting Startedlucide:rocket
Introductionlucide:book-open
Guideslucide:compass
Conceptslucide:lightbulb
Referencelucide:file-code
APIlucide:code
Componentslucide:puzzle
Exampleslucide:folder-open
Tutorialslucide:graduation-cap
Configurationlucide:settings
Deploymentlucide:cloud-upload
Troubleshootinglucide:bug
FAQlucide:help-circle
Changeloglucide:history
Resourceslucide:library

Finding Icons

Browse all available icons at icon-sets.iconify.design. Search for any icon, then use it with the format set-name:icon-name.


API Documentation Components

For documenting APIs, see the dedicated API Reference page which covers:

  • APIEndpoint - Display API endpoints with method badges
  • APIPlayground - Interactive API testing
  • ParamTable / Param - Parameter documentation
  • ResponseField - Response field documentation