Compile-time
No Proxy, no Virtual DOM. The compiler emits surgical DOM updates — it knows exactly which node depends on which value.
Reactivity is resolved at compile time. Components are native Web Components with their own Shadow DOM. Deep reactivity by default, and SSR included.
No Proxy, no Virtual DOM. The compiler emits surgical DOM updates — it knows exactly which node depends on which value.
0.90× Svelte 5 on the official benchmark, ~16 KB brotli (~18 KB gzip), and ~42 ms for 1M deep mutations. No runtime Proxy overhead.
Each component is a Custom Element with its own Shadow DOM. No proprietary runtime — just the platform.
Nested objects and arrays track automatically.
Render-then-replace, Declarative Shadow DOM.
Built-in transitions and FLIP animations.
A client-side router, batteries included.
Global state with $$ stores and § context.
<@module> mounts a component by name.
Reusable markup fragments and named slots.
<@failed> catches errors and shows a fallback.
This counter is a live MJS component. Reactivity is compiled — clicking updates only the number, nothing else.
<script> $count = 0 inc = -> $count++ </script> <button @click={inc}> Clicks : {$count} </button>
Every example below is live: click, tick, drag. The code beside it is the code that runs.
A list, checkboxes, a total: you change one piece of data, the screen follows. Nothing to rewire, ever.
{for todo in $todos}
<@@checkbox checked=!{todo}.done>{todo.label}</@@checkbox>
{end}
<p class="count">{$doneCount} / {$todos.length}</p>0 of 3 done
Two dollar signs in front of a name, and the value exists for the whole page. Three cards, a single score, no wire to pull.
<button @click={$$score++}>{$$score}</button>0
shared score
0
shared score
0
shared score
Thirteen ways to move from one screen to another, adjustable with a single word. Choose a preset, a direction, and watch the page turn.
<routes target="vt">
</routes>
<@view vt :viewTransition.cube={ dir: left }>Searchable dropdown, checkboxes, radio buttons, toggle switch, color swatch, optimized image: shipped with the framework, keyboard-operable, and they submit through an ordinary form.
<div class="screen" --accent={$color}>
<@@field label="Nickname" help="Visible to everyone">
<input type="text" name="nick" value=!{$nick} aria-label="Nickname">
</@@field>
<@@select name="country" search sticky placeholder="Country…" search-placeholder="Search…" value=!{$country}>
<@@option value="fr">🇫🇷 France</@@option>
<@@option value="be">🇧🇪 Belgium</@@option>
<@@option value="ch">🇨🇭 Switzerland</@@option>
<@@option value="ca">🇨🇦 Canada</@@option>
<@@option value="de">🇩🇪 Germany</@@option>
<@@option value="es">🇪🇸 Spain</@@option>
<@@option value="it">🇮🇹 Italy</@@option>
<@@option value="gb">🇬🇧 United Kingdom</@@option>
<@@option value="us">🇺🇸 United States</@@option>
<@@option value="jp">🇯🇵 Japan</@@option>
</@@select>
<div class="row">
<@@radio name="size" value="s" group=!{$size}>S</@@radio>
<@@radio name="size" value="m" group=!{$size}>M</@@radio>
<@@radio name="size" value="l" group=!{$size}>L</@@radio>
</div>
<div class="row">
<@@checkbox name="news" checked=!{$news}>Receive updates</@@checkbox>
<@@switch name="night" checked=!{$night}>Night mode</@@switch>
</div>
<div class="row">
<@@color value=!{$color} editable label="Profile color">
<@@img src="tuto/girl.jpg" alt="Avatar" widths="96 192" sizes="48px">
</div>
<p class="summary">{$nick} · {$country} · size {$size.toUpperCase()} · {if $night}night{else}day{end} · {if $news}subscribed{else}not subscribed{end}</p>
</div>Visible to everyone

Léa · 🇫🇷 France · size M · night · subscribed
Delete, send, leave: ask the question right in the tag. A dialog box in your own colors opens, and nothing happens until someone says yes. The same box can also ask for text, or announce a success.
<button class="x" :confirm="Delete this photo?" @click={remove(photo.id)} aria-label="Delete">✖</button>result = await µmodal.fire title: 'Your first name?', input: 'text'



A success, a warning, a message: one line, and a notification slides into the corner of the screen with its health bar, Steam-style. Sound is added with a single word.
µmodal.notify 'Achievement unlocked: first notification', type: 'success', sound: truebottom right, with sound
Colors live apart from the code: a block of values, set on a card, a section, or the whole site. The closest one wins, and everything inside follows — nested components included.
<theme name="gold">
$$accent: #d4af37
$$card-surface: #2a2410
</theme><@showcase-card theme="gold">Léa
Designer
Marc
Developer
Nour
Project lead
You
Visitor
one attribute, nothing else
Declare your screens, place a zone: links change the view without a reload, the address bar follows, and the Back button works.
<routes target="app">
/ showcase-page-home
/photos showcase-page-photos
/profil showcase-page-profile
/* showcase-page-home
</routes>
<div class="screen">
<div class="phone">
<nav class="tabs">
<a href="#/" :class{µurl.path == '/'}="on">Home</a>
<a href="#/photos" :class{µurl.path == '/photos'}="on">Photos</a>
<a href="#/profil" :class{µurl.path == '/profil'}="on">Profile</a>
</nav>
<div class="view">
<@view app :viewTransition.none>
</div>
</div>
<p class="hint">click: the address changes, the page does not reload</p>
</div>
<style>
:host
display: block
width: 100%
.screen
display: flex
flex-direction: column
align-items: center
justify-content: center
gap: 16px
width: 100%
height: 300px
border-radius: 14px
background: $$screen
box-shadow: inset 0 0 40px color-mix(in srgb, $$accent 8%, transparent)
.phone
width: 260px
margin: 0 auto
border-radius: 22px
border: 1px solid $$border
background: $$panel
overflow: hidden
.tabs
display: flex
a
flex: 1
text-align: center
padding: 10px 0
color: $$muted
text-decoration: none
font-size: 13px
&.on
color: $$fg
box-shadow: inset 0 -2px 0 $$accent
.view
height: 220px
padding: 14px
margin-top: 4px
overflow: hidden
position: relative
.hint
margin: 0
color: $$muted
font-size: 13px
</style><h3>Hello!</h3>
<p>Three screens, one routes file.</p>
<style>
:host
display: block
padding: 16px
color: $$fg
animation: enter .35s ease-out
h3
margin: 0 0 8px
color: $$accent
p
color: $$muted
font-size: 13px
@keyframes enter
from
opacity: 0
transform: translateX(24px)
to
opacity: 1
transform: none
</style><h3>Photos</h3>
<div class="grid">
<img src="µasset('tuto/16/16-5/retrowave.webp')" alt="">
<img src="µasset('tuto/16/16-2/deepsea.webp')" alt="">
<img src="µasset('tuto/16/16-5/halloween.webp')" alt="">
<img src="µasset('tuto/16/16-5/spaaaaace.webp')" alt="">
</div>
<style>
:host
display: block
padding: 16px
color: $$fg
animation: enter .35s ease-out
h3
margin: 0 0 8px
color: $$accent
.grid
display: grid
grid-template-columns: 1fr 1fr
gap: 8px
img
width: 100%
aspect-ratio: 4 / 3
object-fit: cover
border-radius: 8px
@keyframes enter
from
opacity: 0
transform: translateX(24px)
to
opacity: 1
transform: none
</style><h3>Profile</h3>
<div class="avatar">L</div>
<p>Léa — Designer</p>
<style>
:host
display: block
padding: 16px
color: $$fg
animation: enter .35s ease-out
h3
margin: 0 0 8px
color: $$accent
p
color: $$muted
font-size: 13px
.avatar
display: flex
align-items: center
justify-content: center
width: 48px
height: 48px
margin: 8px 0
border-radius: 50%
background: $$accent
color: #06111f
font-weight: 700
font-size: 18px
@keyframes enter
from
opacity: 0
transform: translateX(24px)
to
opacity: 1
transform: none
</style>Effects in one word, variables with rules, nine animated components, models for every component, and everything done together.
*neon · *tilt(15) · *confettiA neon, a glitch, a tilting card, confetti: one word on the tag, its settings between parentheses.
<vars> $age int 18..120 </vars>An integer from 18 to 120, one word out of three: the rule is written once, every write follows it, and the bound field guards itself.
:in=*fly(up) :out=*fadeA tag's entrance and exit are written in the same language as effects.
<@@carousel> <@@tabs> <@@clock>Carousel, deck of cards, tabs, menu, clock, rotary knob, counter, progress circle, cube: shipped with the framework.
layout="compact" · {? timer}A separate style, a detail of the HTML or a whole file: the model is picked on the tag, with layout.
*react · *cursors · *follow · *heatmapLive reactions, the others' cursors, the screen that follows whoever leads, the heat map of clicks — through MJS's real-time server.
{await $myProfile}What has not arrived yet keeps its place, in shimmering grey. Nothing to write.
µ.config.navProgressA streak of light at the top of the page when a page takes its time. Nothing to write.
<@@chart rows={$myProfile} shape="radar">A line, a radar and eight other shapes, with statistics and a tooltip on hover. These two are real components: move your pointer over them.
Trend (the circle: the next estimated point)
| Date | Mobile | Desktop |
|---|---|---|
| Oct 1, 2026 | 820 | 690 |
| Oct 2, 2026 | 870 | 650 |
| Oct 3, 2026 | 1,190 | 430 |
| Oct 4, 2026 | 1,260 | 390 |
| Oct 5, 2026 | 880 | 740 |
| Oct 6, 2026 | 910 | 780 |
| Oct 7, 2026 | 940 | 800 |
| Oct 8, 2026 | 980 | 810 |
| Oct 9, 2026 | 1,010 | 760 |
| Oct 10, 2026 | 1,350 | 470 |
| Oct 11, 2026 | 1,420 | 440 |
| Oct 12, 2026 | 1,020 | 850 |
| Oct 13, 2026 | 1,060 | 870 |
| Oct 14, 2026 | 1,100 | 900 |
| Label | Alex | Sam |
|---|---|---|
| Speed | 85 | 60 |
| Strength | 55 | 80 |
| Stamina | 70 | 75 |
| Accuracy | 90 | 50 |
| Agility | 80 | 55 |
| Tactics | 60 | 85 |
| Defense | 45 | 90 |
Put a word on a tag: it glows, it shakes, it tilts. Hover, click — each one is tuned between parentheses.
See every effect →
*hologram(frame, on: view)*ink(burn, on: view)*annotate(box, color: #22d3ee, on: always, every: 2s)*neon*loader(cross)*dock| ModularJS | 102.35 |
|---|
*delta*particles(network)*matrix<@@tabs layout="curve">The effects one by one are the showcase. Here you tune them by hand, live, on a full page: the ink mask and the filter of your choice, and the line to copy into your tag.

*ink(burn, on: view)
Twenty reveal masks, settings for each one, and your own: drop an image and it becomes the mask.
Open the ink workshop ↗

*filter(lomo) · *blend(screen, image: …, fit: repeat)
Fine settings, 42 styles, 16 blend modes, and two images melted into one another.
Open the filter workshop ↗Precise derived values by default, pages that arrive while the browser is idle, data that loads itself, the virtual list, a server for your AI assistant, and forms drawn from your rules, checked all the way to the server.
$total = $price * $qtyEach derived value follows its sources and is only recomputed when one of them changes. One the build cannot follow keeps the old rule; mjs check --derived tells which is which.
"routes": { "preload": "idle" }The first page is displayed, the others download while the browser is idle, one at a time, without being executed: their visit executes them without requesting anything from the network again. It is the default setting.
$me = µload('/api/me', { refresh: 'focus' })µload returns a store with data, pending, error and refresh(): one request per address for all its readers, kept five minutes in cache, read again after a successful submission to the same path.
$form = µform(@)The rules of your variables give, field by field, the error message, touched and dirty; for the whole form, valid and submitting. The errors of a 422 response are filed field by field.
rules({ age: 'int 18..120' })The server checks the submitted form with the page's rules and messages, no browser needed.
µajax '/api/rewards', type: Reward[]The server's response goes through its rule once, when it arrives: a wrong field shows up right away, not three screens later.
<types>
Reward
id int 1..
title string 1..40
price = 0 int 0..
</types><vars>
$volume int 0..100 strict
$sort 'price' | 'title'
$max int 0..
</vars><script>
µmount ->
$rewards = await µajax '/api/rewards', type: Reward[]
</script>
{for r in $rewards}
<p>{r.title} : {r.price} €</p>
{end}A named type is written once, in a *.types.mjs file: one field per line, with its starting value; a server response is checked against it when it arrives. A component's <vars> keeps the rules of its simple variables, and strict refuses a value instead of correcting it.
Here, the response is checked once, when it arrives: a missing price becomes 0.
<@@virtual items={$rows} key="id" size="48">A list of 100,000 items only draws its visible rows, plus a margin; the scrollbar keeps the size of the whole list.
mjs mcpmjs mcp opens an MCP server: your assistant searches the docs, reads a page, compiles a component and reads its errors, like those of the page of a running mjs dev.
The <vars> block says what each field accepts. The form checks itself as you type, the button waits until everything is right, and the server checks with the same rules. Try “ab”, “admin” or an age of 150.
<vars>
$pseudo string 3..20 ! 'admin' | 'root'
$age int 18..120
$niveau 'debutant' | 'confirme' | 'expert'
$news bool
</vars>
<script>
$age = 30
$niveau = 'debutant'
$news = false
$form = µform(@)
envoyer = -> µmodal.notify "Welcome, #{$pseudo}!", type: 'success'
</script>
<form @submit.prevent=envoyer>
<@@field label="Nickname">
<input name="pseudo" value=!{$pseudo}>
</@@field>
<@@field label="Age">
<@@number name="age" value=!{$age} min="18" max="120"></@@number>
</@@field>
<@@field label="Level">
<@@select name="niveau" value=!{$niveau}>
<@@option value="debutant">Beginner</@@option>
<@@option value="confirme">Intermediate</@@option>
<@@option value="expert">Expert</@@option>
</@@select>
</@@field>
<@@switch name="news" checked=!{$news}>Get the news</@@switch>
<button disabled={not $form.valid}>Sign up</button>
<button type="button" @click={$form.reset()}>Clear</button>
</form>| Criterion | MJS | Svelte | React | Solid |
|---|---|---|---|---|
| Approach | compile-time | compile-time | VDOM | compile-time |
| Runtime | ~16 KB | ~12 KB | ~45 KB | ~4.5 KB |
| Deep reactivity, no Proxy | ✓ | partial | no | manual |
| Native Web Components | ✓ | no | no | no |
| SSR | ✓ | ✓ | ✓ | ✓ |
Figures are indicative and meant to be honest, not promotional.
Audited by Opus 5.5 (Claude, Anthropic)
Each MJS version measured with js-framework-benchmark, alongside Svelte 5 and Solid (from 1.0 to 4.0, all in a single session, on the same machine): the average speed of the 9 operations relative to Svelte 5 (1 = Svelte; lower is faster), the compressed size of the benchmark app and memory; the million writes come from MJS's own mutation benchmark, on the same machine. Uncheck a criterion or a version to hide it.
| Label | MJS (×) | Svelte 5 (×) | Solid (×) |
|---|---|---|---|
| 2.1 | 0.98 × | 1.00 × | 0.95 × |
| 2.2 | 1.00 × | 1.00 × | 0.95 × |
| 2.3 | 0.98 × | 1.00 × | 0.95 × |
| 2.4 | 0.97 × | 1.00 × | 0.95 × |
| 2.5 | 0.98 × | 1.00 × | 0.95 × |
| 3.0 | 0.96 × | 1.00 × | 0.95 × |
| 3.1 | 0.94 × | 1.00 × | 0.95 × |
| 4.0 | 0.90 × | 1.00 × | 0.95 × |
| Label | MJS (KB) |
|---|---|
| 2.1 | 20.0 KB |
| 2.2 | 24.3 KB |
| 2.3 | 31.3 KB |
| 2.4 | 15.2 KB |
| 2.5 | 16.7 KB |
| 3.0 | 16.9 KB |
| 3.1 | 16.9 KB |
| 4.0 | 16.1 KB |
| Label | MJS (ms) |
|---|---|
| 2.1 | 40 ms |
| 2.2 | 42 ms |
| 2.3 | 69 ms |
| 2.4 | 69 ms |
| 2.5 | 75 ms |
| 3.0 | 75 ms |
| 3.1 | 41 ms |
| 4.0 | 42 ms |
| Label | Memory idle (MB) | Memory under load (MB) |
|---|---|---|
| 2.1 | 0.76 MB | 2.54 MB |
| 2.2 | 0.79 MB | 2.57 MB |
| 2.3 | 0.85 MB | 2.62 MB |
| 2.4 | 0.78 MB | 2.54 MB |
| 2.5 | 0.79 MB | 2.55 MB |
| 3.0 | 0.71 MB | 2.54 MB |
| 3.1 | 0.74 MB | 2.50 MB |
| 4.0 | 0.75 MB | 2.42 MB |
Versions 1.0 to 2.3 load the app as several files (split mode); later versions fit in a single one.
The million writes are missing for 1.0 and 2.0: that benchmark's app does not build with these versions.
js-framework-benchmark keyed, same machine and same session as Svelte 5.42.1 and Solid 1.9.3, 11/13/26; million writes: MJS mutation benchmark, same machine, average of 5 sessions, all versions in each, 11/14/26
Audited by Opus 5.5 (Claude, Anthropic)
One command to get the framework.
npm install modularjs-framework