Page Component + TypeScript Only
Client-side wrapper component with compile-time type checking. Smallest bundle size, no runtime validation overhead.
Component Wrapper + TypeScript Only
Quick Start with CLI
Generate this entire pattern automatically:
During the interactive prompts, select Component Wrapper strategy and TypeScript only validator, then define your fields (username, bio).
How It Works
- Client-side only - No server load function required, uses simple component props
- TypeScript only - Compile-time type checking with no runtime validation overhead (0kb validator bundle)
- Wrapper component pattern - Create a component that calls
useLayoutRegions()to set region data - Type-safe props - Full TypeScript support with interface definitions
- Simple API - Use like any other Svelte component with props
Code Examples (used on this page)
1. Define your type with a TypeScript interface:
2. Create a wrapper component that calls useLayoutRegions() to
set region data:
useLayoutRegions(), which sets the region data for
consumption elsewhere in your layout (no runtime validation).3. Consume the region in your layout (just like with load functions):
4. Use the wrapper component anywhere in your pages with simple props — the wrapper
handles calling useLayoutRegions(), which makes the data
available to the region consumer in your layout (with compile-time type checking only).