finds.dev← search

// the find

woutdp/live_svelte

★ 1,645 · Elixir · MIT · updated Apr 2026

Svelte inside Phoenix LiveView with seamless end-to-end reactivity

live_svelte bridges Phoenix LiveView and Svelte by running Svelte components inside LiveView, with the server pushing state changes over the websocket and Svelte handling all DOM updates client-side. It targets Elixir developers who want Svelte's reactivity and animation system without abandoning LiveView's server-driven model. SSR is supported via Node.js, so first-load is not a blank page.

Props diffing sends only changed keys on updates — not full props — which matters at scale with large state objects. The Igniter installer genuinely automates the painful Vite/phoenix_vite wiring that would otherwise take an afternoon to get right. The ~V sigil lets you write Svelte directly inside a LiveView module, which is a clean escape hatch when the component is too small to deserve its own file. The LiveSvelte.Encoder protocol gives you field-level control over what struct data crosses the wire to the browser.

SSR requires Node.js 19+ running in production alongside your Elixir release — that's a second runtime dependency, and the README buries the 'NODE_ENV=production or you get a memory leak' warning in the middle of a long deployment section. Slotted content is wrapped in a div you can't remove, which will break certain CSS layouts (flex/grid direct children). The 'secret state' caveat is real and undersold: any data you pass as props is visible in the Svelte bundle and the websocket payload, which surprises developers coming from server-rendered HEEx. The library ships TypeScript source without pre-built distribution files, so consumers compile it through their own Vite pipeline — fine until Vite or Svelte has a breaking change and your upgrade path runs through the library's release cycle.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →