Skip to main content
Glama

MCP Svelte Docs Server

# $props Definition **Definition:** Declares component props (replaces export let from Svelte 4) **Syntax:** `$props(): any` **Parameters:** None **Returns:** Object containing all component props **Variants:** - `$props.id(): string` - Returns unique ID for the props object ## Examples ```js // Basic props destructuring let { name, age = 25 } = $props(); // With TypeScript interface Props { name: string; age?: number; onClick?: () => void; } let { name, age = 25, onClick } = $props<Props>(); // Rest props let { name, ...rest } = $props(); ``` ## Related - `$bindable` - For two-way binding props - `$state` - For local component state - `component-events` - For component communication patterns

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/spences10/mcp-svelte-docs'

If you have feedback or need assistance with the MCP directory API, please join our Discord server