Skip to Content
Fumadocs

Remark Show

Show content on a condition.

Usage

Remark Show is a remark plugin for the <show> syntax. Fumadocs MDX, @fumadocs/astro and Local Markdown enable it by default.

<show> renders its content when the when expression is true. The expression is evaluated when the page renders, so it can read the page props, like path params. A <show> without when fails to compile.

Page Data

Content that isn't rendered is also left out of the page data: the table of contents, heading IDs, structured data and processed Markdown.

The data comes from Rehype TOC, Remark Structure and Remark LLMs. Without Fumadocs MDX, they generate it at compile time, before any condition can be evaluated, so a document with <show> fails to compile. In a custom content source, enable runtime outputs.

Steps and Tab Groups

<show> can wrap a step, or a code block of a tab group. See the example.

  • Add Remark Show before Remark Steps and remarkCodeTab in your plugins.
  • Keep at least one step, or one tab, outside <show>. Otherwise each <show> gets its own steps or tab group.

How is this guide?