svelte-core

Embed Svelte 5 components in Phoenix LiveView with reactive props and SSR.

Updated Feb 16, 2026
One-click install
npx skills add https://github.com/hwatkins/my-skills --skill svelte-core
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: svelte-core
Source: https://github.com/hwatkins/my-skills/tree/main/skills/svelte-core
Command: npx skills add https://github.com/hwatkins/my-skills --skill svelte-core

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Svelte components can be embedded inside Phoenix LiveView, enabling end-to-end reactivity and SSR while leveraging Svelte's UI capabilities.

Core Features & Use Cases

  • Embed Svelte components in LiveView templates and pass reactive props from server assigns.
  • Leverage SSR by rendering Svelte components on the server with hydration on the client.
  • Use the LiveSvelte APIs (live.pushEvent, component macros, and slot support) to synchronize state with LiveView.

Quick Start

Render a Svelte component in your LiveView by using the svelte wrapper and pass an initial props map.

Frequently Asked Questions about svelte-core

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I embed Svelte components in Phoenix LiveView?

You can embed Svelte 5 components in Phoenix LiveView by using a svelte wrapper in your templates and passing an initial props map for server-driven updates and end-to-end reactivity.

Can I use server-side rendering with Svelte in Phoenix LiveView?

Yes, Svelte components are rendered on the server by default for SSR and then hydrated on the client, ensuring fast initial page loads and interactive UI modules within Phoenix projects.

How do I pass reactive props from LiveView assigns to Svelte?

You pass reactive props from server assigns directly to Svelte components via the wrapper, enabling automatic UI updates when LiveView state changes without manual DOM synchronization.

Does Svelte 5 support LiveView pushEvent for server communication?

Yes, Svelte 5 supports LiveSvelte APIs like live.pushEvent to synchronize state with LiveView, allowing client-side Svelte interactions to trigger server-side events and reactive updates.

What are the use cases for combining Svelte and Phoenix LiveView?

Combining Svelte and Phoenix LiveView is ideal for building interactive dashboards, component libraries, and UI modules that require Svelte interactivity alongside server-driven state updates.