Playground

Write your own Javascript code and see the results. Accept Vue, React, Angular, etc...

This component playground use Sandpack, an awesome Playground powered by Codesandbox.

How can I use it?

To include a playground at your document, just use the JSX syntax <Playground />

export default function App(): JSX.Element {
  return <h1>Hello World</h1>
}

Or you can use the Markdown syntax

Copy to clipboard
1```playground
2\```
export default function App(): JSX.Element {
  return <h1>Hello World</h1>
}

The default template of playground is react-ts

Known issues

  • Templates like vue/vue3 do not work by default. In order to work there is a need to change both the template and the environment;
  • You cannot pass multiple files to one playground.