MenuPages and packages / Starters

Docs / Pages and packages

Starters

A Starter is a way to begin a Snippet: it sets what the Snippet is, and opens it with a small demo.

On this page

A Starter decides where the new Snippet runs: on Node, as a page beside the editor, or as a Vue or Svelte component. That can’t be changed afterwards, so pick the Starter for the code you want to try.

Every Starter

There are 16, in the order the Home screen shows them.

StarterWhat you getRuns
Node.jsJavaScript or TypeScript on Node. Console output only, no page.—
Web PageA page in three Parts: HTML, CSS and JS.—
ReactA React component in JSX.React 19
Web Page + ServerJSpark+A page and its own Node server.—
React + ServerJSpark+A React app and its own Node server.React 19
VueOne Vue component file.Vue 3
SvelteOne Svelte component file.Svelte 5
three.jsA 3D scene drawn on a canvas.three
jQueryA page with jQuery.jQuery 4
D3Data drawn as SVG.D3 7
PreactA Preact component in JSX.Preact 10
SolidA Solid component in JSX, built by Solid’s own compiler.Solid 1
LitA web component made with Lit.Lit 3
Alpine.jsBehaviour written in the markup.Alpine.js 3
Web ComponentsA custom element, with no library.—
CanvasDrawing on an HTML canvas, with no library.—

The two + Server Starters are JSpark+. JSpark lists them with the JSpark+ mark. Picking one opens nothing, and says that a page with its own server needs JSpark+. A Snippet already made from one opens and edits in both. See A page with a server.

Open a Starter

  1. Click + at the end of the tabs, or look at the Home screen, which the window shows when no Snippet is open.
  2. Click a Starter. It opens in a new tab.
Pick Svelte from the + menu: the new tab opens on its demo, and its page appears a moment later.

The demo in each Starter

Each Starter opens with a short demo that runs and prints on the first Run. Delete it and write your own when you are ready.

The React Starter’s demo: a counter component, with JSX and CSS on the strip.
  • With Run as you type on, as it is at first, the demo runs by itself a moment after it opens. The two + Server demos wait for you to press ⌘↵ or Ctrl+Enter.
  • A new Node or web page Snippet is in JavaScript, unless you change Settings → Running → Language for new Snippets. See JavaScript and TypeScript.
  • Every Starter with a CSS Part starts with Tailwind on. See Tailwind CSS.
  • A Starter’s packages come with JSpark, so its first Run works offline.

Which versions of React, Vue and Svelte

A Starter’s page uses two things, which change separately:

  • The library, such as react, vue or svelte, is a package. Each Starter asks for a range: React 19, Vue 3 (3.5 or later), Svelte 5 (5.57 or later). The version you get is the newest in that range when your copy of JSpark was built. The Packages window shows it.
  • The compiler is JSpark’s own: Vue’s and Svelte’s compilers, esbuild for React and Preact JSX, and Solid’s compiler for Solid. It changes only when JSpark updates.
The Packages window on react: its version, and the Starter that needs it with the range it asks for.

The page itself runs in JSpark’s built-in Chromium. Settings → About names its version. See Which Node and which browser.

Hide and reorder Starters JSpark+

In JSpark+, choose which Starters the Home screen and the + offer, and in what order:

  1. Open Settings → Starters (⌘, or Ctrl+,).
  2. Switch a Starter off to hide it. At least one Starter stays on.
  3. Drag a row to move it, or press ⌥↑ or Alt+↑ and ⌥↓ or Alt+↓ on its handle.
Settings → Starters: a switch and a handle for each Starter.

With only one Starter on, + opens it straight away. In JSpark, the list is shown, and changing it says that arranging Starters needs JSpark+.

The pictures show JSpark on a Mac. On Windows, the window looks a little different and uses Ctrl for ⌘, but everything works the same way.

Esc

Type to search every docs page.