What is Sandpack?
CodeSandbox's open-source live code editor component. Edit code in the browser with instant preview — used by Claude.ai artifacts and Vercel v0.
TL;DR: Live code editor component. In-browser editing + instant preview. Used by Claude.ai artifacts and Vercel v0. Supports React/Vue/Angular. Zero server. 5k+ stars.
Best for: Developers of AI chat and platforms that need live code preview.
Core Features
1. Multiple Templates — React/Vue/Angular/Node.js
2. Custom Files — any file structure
3. npm Dependencies — install and use in the browser
4. AI Integration — render AI-generated code
FAQ
Q: Need a server? A: No — bundling and execution happen in the browser.
Q: How does Claude.ai use it? A: Claude artifacts render generated React code via Sandpack.