Introduction

What svelte-sheet is, what it can do, and where it stands.

svelte-sheet is a spreadsheet for Svelte: the engine of one, and a grid to put it on a page. You type into cells, write formulas that work out as you type, show numbers the reader’s way, undo, copy and paste, and open and save files. A sheet’s cells are records in a store, so a sheet is saved and synced cell by cell, and a person and a script can work in the same one.

The engine is plain TypeScript. It runs without Svelte and without a browser, so a server, a test or an AI agent’s tool reads and changes the same sheet the screen shows, with the same methods the grid uses.

What it is made of

Two layers, structured like the TanStack libraries: a core in plain TypeScript that knows no framework, and a Svelte layer on top. A Svelte app imports one thing, and the core also comes on its own:

ImportWhat it is
@klementine/svelte-sheeteverything for a Svelte app: the grid, and the whole engine
@klementine/svelte-sheet/corethe engine alone: the sheet, the formulas, the files and the editor, in plain TypeScript with no UI framework

How it is built explains the engine in five ideas.

Where it stands

  • Tested in Node, in Chrome and in Firefox, nowhere else. The engine has its own tests, which need no browser, and the grid is worked in Chrome with a pointer and keys; the same tests pass in Firefox, where they run only when asked for. Nobody has tried it in Safari, on a real phone or with a screen reader. What is built says which is which, line by line.
  • Built with AI. The code, the tests and these pages are written by AI coding agents (Claude Code), directed by the project’s maintainers. The pages are not finished: not all of them have been reviewed by a person yet.
  • The UI is yours. The library provides the engine and the grid, in plain CSS. The toolbar, the formula bar and the menus you build in your own design: on the editor, or by adapting the ones in the spreadsheet example. Getting started shows both.
  • A small spreadsheet. 33 functions, 100,000 rows by 702 columns, one sheet per file. No dates, no charts, no sorting, no inserting rows.
  • No sync in the box. Every change is announced as a diff of records with where it came from, and the library sends nothing anywhere. A sync is a listener you write; Saving and syncing shows the seam.

Credits

The cells are kept in the record store of svelte-draw, an infinite canvas for Svelte, and the undo history and the editor’s signals are that library’s too. The formula language is the one people know from Google Sheets, which is the reference for how a formula behaves. The demo’s controls use bits-ui and Phosphor icons. svelte-sheet is an independent project and is not affiliated with Google.

Licence

MIT. Use it, change it, ship it; keep the copyright notice.