props in Svelte
From the Svelte cheat sheet · Props & Bindings · verified Jul 2026
$props
Component props in Svelte 5
javascript
<script>
// Basic props
let { name, age } = $props();
// With defaults
let {
title = 'Default',
count = 0
} = $props();
</script>
<h1>{title}</h1>
<p>{name} is {age}</p>🎯 Replaces export let declarations from Svelte 4
📦 Destructure all props at once for cleaner code
🔧 Full TypeScript support with generics
⚡ Props are reactive by default