MDX embedding
Insert the same registry chart into Fumadocs / MDX or RSC pages.
Pattern
- Install (or use the demo export)
chart-area-stacked - Register the client component in
getMDXComponents - Use the JSX tag in MDX
import { ChartAreaStacked } from "@/components/charts"
export function getMDXComponents(components) {
return {
...defaultMdxComponents,
ChartAreaStacked,
...components,
}
}## Mix over time
<ChartAreaStacked />Live demo
Same registry item as json-render: chart-area-stacked
This is the same registry item used in the json-render demo — server MDX and client dynamic trees share one source component.