Tested tool guide
Tested browser tools
Checked August 16, 2026
What Svelte Component Playground does, with a checked example
A browser sandbox for writing Svelte components: type the component's script, markup, and styles into the editor and a preview pane renders the result, updating as you edit. The code is compiled with the Svelte compiler inside the page, so reactive declarations, stores, and event handlers behave as they would in a real app, and nothing you type is uploaded anywhere. The most common stumble is the dollar sign: store values must be read as `{$count}`, while `{count}` renders the store object itself.
Worked example
A concrete input and expected output from the current implementation.
Input
<script>
import { writable } from 'svelte/store';
const count = writable(0);
const add = () => count.update(n => n + 1);
$: doubled = $count * 2;
</script>
<button onclick={add}>Add one</button>
<p>{$count} -> {doubled}</p> ->
Expected output
Renders a button labeled Add one with a paragraph reading `0 -> 0`. Each click calls `count.update(n => n + 1)`, raising the store value by 1, and the reactive declaration recomputes `doubled` before the next paint, so after one click the paragraph reads `1 -> 2` and after two clicks `2 -> 4`.
The compiler tracks that `doubled` references `$count`, so every store update re-runs the declaration before rendering, and the paragraph always shows the current store value and its double. The figures follow directly: 0*2=0, then 1*2=2, then 2*2=4.