• Getting Started
  • Install


Install the Sandpack dependency on your project.

npm i @codesandbox/sandpack-react

All the components and the bundler are packed inside the Sandpack component, which is a named export of the package. Besides that, the package contains multiple components, utilities and typings.


This should give you a nice code editor with a preview that runs in the browser.

Editable example

import { Sandpack } from "@codesandbox/sandpack-react";

export default function App() {
  return <Sandpack />


Next steps