--- name: fern-components description: Knowledge of Fern's built-in MDX component library (accordions, callouts, cards, steps, tabs, code blocks, API-reference snippets, and more) for authoring docs pages. Use when writing or editing a Fern `.mdx` page and deciding whether a component would present content better than plain Markdown, when a user asks "what Fern components exist" or "how do I use ``", or when reviewing a page for missed opportunities to use a component. Complements dynamo-docs (which owns page placement, nav, frontmatter, and the style guide). license: Apache-2.0 metadata: author: NVIDIA tags: - fern - docs - mdx --- # Fern Components Fern ships a built-in library of ~27 MDX components you can use in documentation pages without importing anything. This skill catalogs them, says **when each is worth reaching for**, and points to [`references/components-reference.md`](references/components-reference.md) for exact syntax, every prop, and copy-paste examples. This skill is **component knowledge only**. Page placement, `docs/index.yml` nav, frontmatter, SPDX headers, links, terminology, and the style guide belong to the **dynamo-docs** skill — use both together when authoring. ## The `.md` vs `.mdx` rule (read this first in this repo) Fern components are JSX. They render **only in `.mdx` files**. This repo (`ai-dynamo/dynamo`) mixes two page formats, and the boundary is a hard must-fix: | Page type | How to write rich content | |---|---| | **`.mdx`** (e.g. `kubernetes/getting-started/introduction.mdx`, recipe pages) | Use Fern components **directly** — ``, ``, ``, ``, ``, etc. | | **`.md`** (most docs pages) | **Do not hand-write ``/``/etc.** Write callouts GitHub-style (`> [!NOTE]`); `docs/fern/scripts/convert_callouts.py` converts them at build. Other components (Cards, Steps, Tabs…) are **not** available — restructure with plain Markdown, or convert the page to `.mdx` on purpose. | Callout conversion map (GitHub → Fern), for `.md` pages: | `> [!NOTE]` | `> [!TIP]` | `> [!IMPORTANT]` | `> [!WARNING]` | `> [!CAUTION]` | |---|---|---|---|---| | `` | `` | `` | `` | `` | **Before using any component below, confirm the target file is `.mdx`.** If it's `.md` and you need a non-callout component, the decision (restructure vs. rename to `.mdx`) is a dynamo-docs / nav concern — raise it, don't silently rename. ## When to reach for a component (and when not) Prefer plain Markdown. A component earns its place only when it does something Markdown can't: progressive disclosure, sequencing, branching, live API data, or interactivity. Don't decorate — an ordered list is better than `` for two trivial steps, and a sentence is better than a `` whose only job is to host a link (see the dynamo-docs / Fern cross-reference guidance). | You want to… | Component | Notes | |---|---|---| | Flag a note / warning / tip | **Callout** (`` `` `` `` `` `` `` ``) | In `.md`, use `> [!NOTE]` syntax instead (see above). | | Collapse FAQs / optional detail | **Accordion** / **AccordionGroup** | Content stays SEO-indexed while collapsed. | | Sequence a tutorial / setup | **Steps** / **Step** | Auto-numbered, anchor links. Use `toc` to surface in the TOC. | | Show the same thing per-language / per-OS | **Tabs** / **Tab** | `language=` syncs all tabs+code blocks site-wide. | | Navigation grid / feature hub | **Card** / **CardGroup** | `cols={n}`, Font Awesome icons, images, `href` makes the whole card clickable. | | Rich code (highlight, focus, title, embed a file) | **Code block** / `` / `` / `` | Fenced ``` with attrs; `` embeds local/GitHub files. | | Multiple install commands (npm/pnpm/yarn) | **CodeGroup** with `for=` | Custom sync group independent of language. | | Image with caption / framing | **Frame** | Wraps ``/`