Nextra 3.0 已發布。 閱讀更多

Playground

MDX
Playground 載入中...

用法

基本用法
import { Playground } from 'nextra/components'
 
# Playground
 
Below is a playground component. It mixes into the rest of your MDX perfectly.
 
<Playground source="## Hello world" />

您也可以指定一個後備組件,如下所示

使用後備組件
import { Playground } from 'nextra/components'
 
<Playground
  source="## Hello world"
  fallback={<div>Loading playground...</div>}
/>