Sandpack is a browser-based toolkit for building live code editing experiences. It combines a custom Node.js runtime that executes JavaScript and npm dependencies entirely client-side with composable React components for assembling code editor interfaces, all within an iframe-sandboxed execution environment for security.
The toolkit provides a hot-reload development workflow where file and dependency updates are streamed to the running preview and trigger automatic recompilation without a full page refresh. It includes a theme-override styling system for customizing the editor and preview appearance, along with predefined theme selection and the ability to import community themes from an external package.
Sandpack supports embedding live code editors and interactive playgrounds into any web page, with bidirectional event-driven communication between the editor and bundler. It also offers shareable sandbox URL generation and one-click opening of snippets in the full CodeSandbox editor for collaboration or debugging.