Scripts2026年4月8日·1 分钟阅读

Sandpack — AI-Powered Live Code Editor Component

Embed live code editors in web apps with instant preview. Sandpack by CodeSandbox powers interactive coding experiences for AI chatbots, docs, and educational platforms.

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.

🙏

来源与感谢

codesandbox/sandpack — 5k+ stars, Apache 2.0

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产