sandpack-vue3
| Install | |
|---|---|
npm install sandpack-vue3 |
|
| Latest Version: | 3.1.12 |
| Vue: | 3 |
| License: | MIT |
| Last Updated: | Dec 30, 2024 |
| Links: | GitHub · npm |
Sandpack Vue3
Vue3 components that give you the power of editable sandboxes that run in the browser.
import { Sandpack } from 'sandpack-vue3';
<Sandpack template="vue3" />;
Frome 3.0, we add some new templates:
node nextjs vite vite-react vite-react-ts vite-vue vite-vue-ts vite-svelte vite-svelte-ts vite-solid vite-lit astro
online demo
Here's an example of a react version for comparison
https://stackblitz.com/edit/vitejs-vite-axyaxx
releases
https://github.com/jerrywu001/sandpack-vue3/releases
Sandpack Themes
A list of themes to customize your Sandpack components.
import { githubLight } from "@codesandbox/sandpack-themes";
<Sandpack theme={githubLight} />;
Documentation
For full documentation, visit https://sandpack.codesandbox.io/docs/
This project removes [devtools component && useSandpackLint hook]
SSG/SSR
Register Components Globally
// main.ts
import SanpackPlugin from 'sandpack-vue3';
app.use(SanpackPlugin());
// tsconfig.json
{
"compilerOptions": {
"types": [
"sandpack-vue3/global"
]
}
}
registe components
- Sandpack
- SandpackLayout
- SandpackConsole
- SandpackTests
- CodeEditor
- SandpackProvider
- ErrorOverlay
- LoadingOverlay
- SandpackCodeEditor
- SandpackCodeViewer
- SandpackPreview
- SandpackStack
- SandpackTranspiledCode
- SandpackFileExplorer
Tips ☕
When using vue, please do not write it that way, It will not take effect
// 💀
<div style={{ height: 200 }}>
👉🏽Write it like this
<div style={{ height: '200px' }}>
install
npm i
npm run storybook
for nuxt3
- nuxt.config.ts
import { defineNuxtConfig } from 'nuxt';
export default defineNuxtConfig({
vite: {
define: {
'process.env.LOG': {},
},
},
});
Supported browsers
npx browserslist
Sponsor
Special Sponsor
Related Packages
A very fast and versatile markdown toolchain. AST, React, React Native, SolidJS,...
Version History
| Version | Released | License |
|---|---|---|
| 3.1.12 | MIT | |
| 3.1.11 | MIT | |
| 3.1.10 | MIT | |
| 3.1.9 | MIT | |
| 3.1.8 | MIT | |
| 3.1.7 | MIT | |
| 3.1.6 | MIT | |
| 3.1.5 | MIT | |
| 3.1.4 | MIT | |
| 3.1.3 | MIT | |
| 3.1.2 | MIT | |
| 3.1.1 | MIT | |
| 3.1.0 | MIT | |
| 3.0.7 | MIT | |
| 3.0.6 | MIT | |
| 3.0.5 | MIT | |
| 3.0.4 | MIT | |
| 3.0.3 | MIT | |
| 3.0.2 | MIT | |
| 3.0.1 | MIT | |
| 3.0.0 | MIT | |
| 2.2.3 | MIT | |
| 2.2.2 | MIT | |
| 2.2.1 | MIT | |
| 2.2.0 | MIT | |
| 2.1.0 | MIT | |
| 2.0.6 | MIT | |
| 2.0.5 | MIT | |
| 2.0.4 | MIT | |
| 2.0.3 | MIT |
Showing the latest 30 of 33. See every release on npm
Pre-releases (2)
| Version | Released | License |
|---|---|---|
| 3.0.6-beta.1 | MIT | |
| 3.0.6-beta.0 | MIT |