svelte-codesandbox
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

svelte-codesandbox

Sandbox Component Showcase

A powerful Svelte wrapper component around the CodeSandbox editor embed. Useful for creating interactive demos and documenting code without throwing together your own REPL.

Installation

npm

npm install svelte-codesandbox

pnpm

pnpm install svelte-codesandbox

yarn

yarn add svelte-codesandbox

Usage

Basic Usage

<script>
    import { Sandbox } from "svelte-codesandbox";
</script>

<Sandbox id="sandbox-id" />

Customizing the Sandbox

<script>
    import { Sandbox } from "svelte-codesandbox";
</script>

<Sandbox
    --sandbox-height="800px"
    src="sandbox-id"
    codemirror
    fontSize={16}
    theme="light"
    highlights={[1, 3]}
    modules={["src/index.js", "src/App.js"]}
/>

For an in-depth list of customization options, visit CodeSandbox's embedding documentation.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    11
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    11

Package Sidebar

Install

npm i svelte-codesandbox

Weekly Downloads

10

Version

1.0.0

License

none

Unpacked Size

7.32 kB

Total Files

7

Last publish

Collaborators

  • tropix126