Framework Examples¶
Litestar Vite supports a wide variety of frontend frameworks. This section provides working examples for each supported framework.
React
React 18+ with Vite
Vue
Vue 3 with Composition API
Svelte
Svelte 5 with Vite
Angular
Angular 18+ (Vite or CLI)
Inertia.js
SPAs with server-side routing
HTMX
Hypermedia-driven applications
Quick Scaffold¶
Use the CLI to scaffold any framework:
# React
litestar assets init --template react
# Vue
litestar assets init --template vue
# Svelte
litestar assets init --template svelte
# Angular (Vite-based)
litestar assets init --template angular
# HTMX
litestar assets init --template htmx
# With Inertia.js
litestar assets init --template react-inertia
litestar assets init --template vue-inertia
litestar assets init --template svelte-inertia
Framework Comparison¶
Framework |
Source Dir |
Dev Server |
Inertia Support |
Best For |
|---|---|---|---|---|
React |
|
Vite + HMR |
Yes |
SPAs, complex UIs |
Vue |
|
Vite + HMR |
Yes |
SPAs, progressive enhancement |
Svelte |
|
Vite + HMR |
Yes |
Lightweight SPAs |
Angular |
|
Vite (Analog) |
No |
Enterprise apps |
Angular CLI |
|
ng serve |
No |
Standard Angular workflow |
HTMX |
|
Vite + HMR |
No |
Server-rendered, minimal JS |