CmdocsCmdocs
Components

Components

All built-in UI components — auto-imported, ready to use in any MDX page.

Components

cmdocs ships a rich set of UI components that are auto-imported into every MDX file. No import statements — just use the component directly and the pipeline injects the right import at build time.

any-page.mdx
<Callout type="info">
  No import needed — this just works.
</Callout>

When to reach for which component

NeedComponentUse case
Highlight a fact, warning, or tipCalloutInline info/warn/error banners
Link to related pagesCardsResponsive grid of linked summaries
Alternate between parallel contentTabsPackage managers, OS variants, language variants
Walk users through an ordered procedureStepsInstall/setup/deploy flows
Collapse optional or FAQ contentAccordionFAQs, "advanced" details, troubleshooting
Show a file or folder layoutFilesProject structure, scaffolding examples
Document props / config / API fieldsTypeTableReference tables with types and defaults
Show syntax-highlighted codeCode blocksEvery language, with optional titles
Diagram a flow or state machineMermaidArchitecture, sequence, state diagrams
Embed an imageImagesScreenshots, diagrams, logos (zoomable)

Full catalog

How auto-imports work

At build time, the cmdocs pipeline scans each MDX file, detects which components it uses, and injects the matching imports before Next.js compiles the file. That means:

  • You never write import { Callout } from "fumadocs-ui/components/callout" — it just works.
  • Component names are fixed and case-sensitive (<Callout>, not <callout>).
  • Only the components you actually use end up in the compiled page.
  • Unknown component names (e.g. <MyCustomThing>) fail at build time — there is no custom component loader today.

Icons

Several components (<Card>, <Accordion>, navbar links, tabs, frontmatter) accept an icon prop. Values can be either:

  1. A Lucide icon name — e.g. "BookOpen", "Rocket", "Github".
  2. An emoji — e.g. "📘", "🚀", "⚙️".

Icons are resolved at build time. A typo falls back to a generic placeholder and logs a warning.

Tips for picking

  • Don't over-decorate. One Callout per page, one Steps block, at most one Accordion set. Dense markup is hard to scan.
  • Tabs vs Steps. Tabs are parallel (pick one), Steps are sequential (do all, in order).
  • Accordion vs Callout. Accordion for optional detail the reader can skip; Callout for a must-read note.
  • Cards at the bottom. Use a Cards row at the end of a page as the "where next?" CTA, not mid-page.

What's next

How is this guide?

On this page