Code Block (Dynamic)
A codeblock that also highlights code
MuseMVP DocsA codeblock that also highlights code
import { DynamicCodeBlock } from 'fumadocs-ui/components/dynamic-codeblock';
<DynamicCodeBlock lang="ts" code='console.log("Hello World")' />;This component, different from the MDX CodeBlock component, can be used without MDX.
It highlights the code with Shiki and use the default component to render it.
Features:
import { DynamicCodeBlock }
console.log("This is pre-rendered")console.log("This is pre-rendered")