Let the browser do the work.
Native elements first.
Shared listeners, not copies.
Zero bytes where the browser can.
Accessible primitives and a data table for Svelte 5.
Real components. Try them.
Every tile is the shipped primitive with its stylesheet. Open the code: it is all you write.
Buttons
- Button 0 B
Show status
Paid Due soon Overdue DraftInvoices sync every hour
The last run finished at 09:00.
Copy a link
Search and choose
- Select 5 kB
Pick a range
- Date picker 9.5 kB
- Calendar 4.6 kB
Open a menu
Format text
- Toolbar 1.7 kB
- Toggle group 1.9 kB
- Tooltip 2.7 kB
Settings
- Checkbox 0 B
- Radio group 0 B
Confirm a delete
Switch views
Four open tasks, two due this week.Mei Tanaka moved the launch to Friday.Six members across two teams.- Tabs 1.8 kB
Notify
Show progress
- Progress 0 B
Verify a code
Filter by price
Price, USD200 – 800
- Slider 1.5 kB
Rate
- Rating 0 B
Weights are production JavaScript, brotli, per primitive. Zero means the browser does the work. All primitives
A few lines. No components.
No component imports, no wrappers. The Vite plugin reads the attributes and adds only the behaviors a page uses.
<script lang="ts">
import '@svelte-lean/styles/button.css';
import '@svelte-lean/styles/dialog.css';
import '@svelte-lean/styles/hint.css';
let { url }: { url: string } = $props();
</script>
<button data-slean="button" commandfor="share" command="show-modal">
Share
</button>
<dialog id="share" data-slean="dialog" closedby="any" aria-labelledby="share-title">
<header>
<h2 id="share-title">Share this page</h2>
<p><code>{url}</code></p>
</header>
<footer>
<button data-slean="button" data-slean-copy={url}
data-slean-hint="Copy link" data-slean-hint-copied="Copied">
Copy link
</button>
<button data-slean="button" data-variant="text" commandfor="share"
command="close">Done</button>
</footer>
</dialog>A real screen, built from primitives.
2 seats free.
Invitations take a seat once they are accepted.
Actions | ||||
|---|---|---|---|---|
Amara Okafor amara.okafor@harbor.studio | Engineering | Owner | Active | |
Jonas Lindqvist jonas.lindqvist@harbor.studio | Design | Admin | Active | |
Mei Tanaka mei.tanaka@harbor.studio | Operations | Member | Away | |
Rafael Duarte rafael.duarte@harbor.studio | Growth | Member | Active | |
Selin Aydın selin.aydin@harbor.studio | Engineering | Admin | Active | |
Noah Brenner noah.brenner@harbor.studio | Design | Member | Away | |
Priya Raman priya.raman@harbor.studio | Operations | Member | Active | |
Elias Moreau elias.moreau@harbor.studio | Growth | Member | Active | |
Hana Kowalska hana.kowalska@harbor.studio | Engineering | Admin | Away | |
Ömer Say omer.say@harbor.studio | Design | Member | Active |
- hana.kowalska@harbor.studio Design Pending
- lucas.ferreira@harbor.studio Growth Pending
Owner
Admin
Member
Fifty thousand rows. Still a table.
Every row is a real row in the document. Off-screen rows are skipped by the browser, and the rest mount between frames.
The table mounts when this section comes into view.
<DataTable
{data}
{columns}
getRowId={(row) => row.id}
layout="grid"
progressive
pagination={false}
searchable
stickyHeader
height="30rem"
/>Timings are taken in your browser as you watch, not published results. Grid layout and progressive mounting The table: grouping, editing, pivot, export
Ten thousand tabs. No new listeners.
Behavior is registered once per page, not copied into every instance. Mount more tabs and read the document again.
- Tabs roots
- 1
- Mount, this browser
- …
- Listeners on elements
- …
- Listeners on the document
Measured against Bits UI
Same UI, production builds, headless Chrome.
Dialog, JavaScript
Menu, JavaScript 14.2× smaller
Tabs, JavaScript 3.7× smaller
Time to mount, a thousand tabs 6.3× faster
JavaScript heap, a thousand tabs 21.5× smaller
Median of nine runs; heap after garbage collection. Open the proof page
Most of it weighs nothing.
27 of 50 primitives are plain HTML with a stylesheet: they add no JavaScript.
Production build, brotli, including the shared kernel each behavior needs. All measurements
@svelte-lean/query · v0.2.0
Svelte Lean Query
Server state for Svelte 5: endpoints defined once, a cache keyed by params, invalidation by typed tags and the loading states a screen needs, built on runes.
Read the documentation- Queries
- Mutations
- Cache
- Invalidation
- Polling
- Realtime
npm install @svelte-lean/querypnpm add @svelte-lean/queryyarn add @svelte-lean/querybun add @svelte-lean/queryThe bracket is the browser. The square is Svelte Lean.
Start with the HTML you already know.
npm install @svelte-lean/primitivespnpm add @svelte-lean/primitivesyarn add @svelte-lean/primitivesbun add @svelte-lean/primitives