Inertia Integration¶
Note
This page has moved to the Inertia.js section for comprehensive documentation.
The Inertia.js documentation has been reorganized into a dedicated section with focused pages:
Getting Started¶
Installation - Installation and setup
Configuration - InertiaConfig reference
How It Works - Protocol overview
The Basics¶
Pages - Page components
Responses - InertiaResponse
Redirects - Redirect responses
Routing & Navigation - Routing and named routes
Forms - Form handling
File Uploads - File upload patterns
Validation - Validation errors and error bags
Links - Navigation
Data & Props¶
Shared Data - Shared props
Flash Data - Flash messages
Partial Reloads - Lazy props and partial reloads
Deferred Props - Deferred loading
Once Props - Client-cached props
Merging Props - Infinite scroll
Load When Visible - Optional props + WhenVisible
Polling - Polling updates
Prefetching - Prefetching visits
Infinite Scroll - Infinite scroll guide
Remembering State - Remembered client state
Security¶
CSRF Protection - CSRF configuration
History Encryption - History encryption
Precognition - Precognition validation
TypeScript¶
TypeScript Integration - TypeScript integration
Type Generation - Type generation config
Typed Page Props - Typed page props
Shared Props Typing - Shared props typing
Quick Reference¶
Installation:
pip install litestar-vite
Basic Usage:
from typing import Any
from litestar import Litestar, get
from litestar_vite import ViteConfig, VitePlugin
@get("/", component="Home")
async def home() -> dict[str, Any]:
return {"message": "Hello, World!"}
app = Litestar(
route_handlers=[home],
plugins=[
VitePlugin(config=ViteConfig(dev_mode=True, inertia=True)),
],
)
Helpers:
Response Classes:
See Also¶
Inertia.js - Complete documentation
Fullstack Example - Production example