Svelte llms.txt · AI Docs Browser · mdream

[llms.txt Tools](https://mdream.dev/llms-txt/svelte/llms-txt)

# Svelte llms.txt

Browse Svelte documentation as markdown. Click any page in the sidebar to view it, or copy the full llms.txt for your AI tools.

svelte.dev/llms.txt

[Raw llms.txt](https://svelte.dev/docs/svelte/llms.txt) [Raw llms-full.txt](https://svelte.dev/llms-full.txt)

Copy Markdown [](https://svelte.dev/llms.txt)

llms.txt

Alternatives to SvelteKit

Editor tooling

Getting help

<script>

<script module>

<style>

$state.raw

$state.snapshot

$state.eager

Passing state into functions

Passing state across modules

$derived.by

Understanding dependencies

Overriding derived values

Deriveds and reactivity

Destructuring

Update propagation

$effect.pre

$effect.tracking

$effect.pending

$effect.root

When not to use $effect

Fallback values

Renaming props

Rest props

Updating props

Type safety

$props.id()

$inspect(...).with

$inspect.trace(...)

Tags

Element attributes

Component props

Spread attributes

Events

Text expressions

Comments

Keyed each blocks

Each blocks without an item

Else blocks

Snippet scope

Passing snippets to components

Typing snippets

Exporting snippets

Programmatic snippets

Snippets and slots

Optional snippets

Styling

Attachment factories

Inline attachments

Conditional attachments

Passing attachments to components

Controlling when attachments re-run

Creating attachments programmatically

Converting actions to attachments

Function bindings

<input bind:value>

<input bind:checked>

<input bind:indeterminate>

<input bind:group>

<input bind:files>

<select bind:value>

<audio>

currentTime

playbackRate

paused

volume

muted

duration

buffered

seekable

seeking

ended

readyState

played

<video>

<img>

naturalWidth

naturalHeight

<details bind:open>

window and document

Contenteditable bindings

innerHTML

innerText

textContent

Dimensions

clientWidth

clientHeight

offsetWidth

offsetHeight

contentRect

contentBoxSize

borderBoxSize

devicePixelContentBoxSize

bind:this

bind:property for components

Typing

Local vs global

Built-in transitions

Transition parameters

Custom transition functions

Transition events

Animation Parameters

Custom animation functions

Attributes

The class: directive

Synchronized updates

Concurrency

Indicating loading states

Error handling

Server-side rendering

Forking

Caveats

Breaking changes

Specificity

Scoped keyframes

:global(...)

:global

await

Properties

Using transformError

Legacy APIs

options

When to use stores

svelte/store

Store contract

setContext and getContext

Using context with state

Component testing

Replacing global state

onMount

onDestroy

tick

Deprecated: beforeUpdate / afterUpdate

mount

unmount

render

hydrate

Serialization

CSP

$state

$derived

$effect

{@attach ...}

function binding

$inspect

createSubscriber

$props

$inspect.trace

Events

Snippets

Each blocks

Using JavaScript variables in CSS

Styling child components

Context

Async Svelte

Avoid legacy features

Unit and component tests with Vitest

Component tests with Storybook

End-to-end tests with Playwright

<script lang="ts">

Preprocessor setup

tsconfig.json settings

target

verbatimModuleSyntax

isolatedModules

Typing $props

Generic $props

Typing wrapper components

Typing $state

The Component type

Enhancing built-in DOM types

Component lifecycle

Component options

ElementInternals

Caveats and limitations

Exceptions

Minimum version requirements

#8566

sveltejs/kit#10172

#8516

198dbcf

198dbcf

#8488

Browser conditions for bundlers

rollup-plugin-svelte

svelte-loader

Removal of CJS related output

Stricter types for Svelte functions

#7224

#7442

#8136

Custom Elements with Svelte

SvelteComponentTyped is deprecated

Transitions are local by default

Default slot bindings

Preprocessors

New eslint package

Other breaking changes

#8628

#8629

#8775

#6750

#7947

#8763

here

Reactivity syntax changes

Event changes

Snippets instead of slots

Migration script

Components are no longer classes

<svelte:component> is no longer necessary

Whitespace handling changed

Modern browser required

Proxies

ResizeObserver

Changes to compiler options

The children prop is reserved

Breaking changes in runes mode

Other breaking changes

I'm new to Svelte. Where should I start?

Where can I get support?

Are there any third-party resources?

How can I get VS Code to syntax-highlight my .svelte files?

Is there a tool to automatically format my .svelte files?

How do I document my components?

Does Svelte scale?

Is there a UI component library?

How do I test Svelte apps?

Svelte docs on testing

Setup Vitest using the Svelte CLI

Svelte Testing Library

Svelte Component Testing in Cypress

Example using uvu test runner with JSDOM

Test Svelte components using Vitest & Playwright

Component testing with WebdriverIO

Is there a router?

How do I write a mobile app with Svelte?

Can I tell Svelte not to remove my unused styles?

Is Svelte v2 still available?

How do I do hot module reloading?

SvelteComponent

migration guide

migration guide

migration guide

migration guide

SvelteComponentTyped

afterUpdate

beforeUpdate

createContext

createEventDispatcher

createRawSnippet

flushSync

fork

getAbortSignal

getAllContexts

getContext

hasContext

hydratable

hydrate

mount

onDestroy

onMount

setContext

settled

tick

unmount

untrack

Component

ComponentConstructorOptions

ComponentEvents

ComponentInternals

ComponentProps

ComponentType

EventDispatcher

Fork

MountOptions

Snippet

Action

ActionReturn

flip

AnimationConfig

FlipParams

createAttachmentKey

fromAction

Attachment

VERSION

compile

compileModule

migrate

parse

parseCss

preprocess

print

walk

AST

CompileError

CompileOptions

require-trusted-types-for 'script'

CompileResult

MarkupPreprocessor

ModuleCompileOptions

Preprocessor

PreprocessorGroup

Processed

Warning

backIn

backInOut

backOut

bounceIn

bounceInOut

bounceOut

circIn

circInOut

circOut

cubicIn

cubicInOut

cubicOut

elasticIn

elasticInOut

elasticOut

expoIn

expoInOut

expoOut

linear

quadIn

quadInOut

quadOut

quartIn

quartInOut

quartOut

quintIn

quintInOut

quintOut

sineIn

sineInOut

sineOut

on

asClassComponent

createBubbler

createClassComponent

handlers

nonpassive

once

passive

preventDefault

run

self

stopImmediatePropagation

stopPropagation

trusted

LegacyComponentType

Spring

Tween

prefersReducedMotion

spring

tweened

Spring

SpringOptions

SpringUpdateOptions

TweenOptions

Tweened

Updater

devicePixelRatio

innerHeight

innerWidth

online

outerHeight

outerWidth

screenLeft

screenTop

scrollX

scrollY

MediaQuery

SvelteDate

SvelteMap

SvelteSet

SvelteURL

SvelteURLSearchParams

createSubscriber

render

derived

fromStore

get

readable

readonly

toStore

writable

Readable

StartStopNotifier

Subscriber

Unsubscriber

Updater

Writable

blur

crossfade

draw

fade

fly

scale

slide

BlurParams

CrossfadeParams

DrawParams

EasingFunction

FadeParams

FlyParams

ScaleParams

SlideParams

TransitionConfig

fragment-defining tag

Client errors

Server errors

Shared errors

Client warnings

Shared warnings

Understanding dependencies

Browser-only code

Component exports

Renaming props

Component events

Named slots

Fallback content

Passing data to slotted content

Creating a component

$set

$on

$destroy

Component props

Server-side component API

## What is Svelte's llms.txt?

Svelte publishes an `/llms.txt` file that provides AI systems with a structured index of its documentation. It follows the [llms.txt specification](https://llmstxt.org), organizing links to guides, API references, and tutorials under section headings so that LLMs like ChatGPT, Claude, and Gemini can quickly understand what Svelte offers and where to find details.

Issues

Spec

361

Sections

69

Links

463.5 KB

Size

~118.5k

Tokens

Sections: Alternatives to SvelteKit · Editor tooling · Getting help · <script> · <script module> · <style> · and 355 more

## Add Svelte Docs to Your AI Assistant

Select your tool to see how to add Svelte's llms.txt as a documentation source.

Cursor

 Windsurf

 Claude Code

 ChatGPT

 Zed

 Copilot

1. 1

   Open any chat or composer panel
2. 2

   Type @Docs and select "Add new doc"
3. 3

   Paste the URL: https://svelte.dev/llms.txt
4. 4

   Wait for the green dot (indexing complete)
5. 5

   Reference @Docs in chat when asking about Svelte

Cursor crawls the URL and indexes all subpages. Add a trailing slash to index child pages too.

## Spec Compliance 405 errors

## Frequently Asked Questions

Where is Svelte's llms.txt file?

Svelte publishes its llms.txt at https://svelte.dev/llms.txt. This file provides a structured, markdown-formatted index of Svelte's documentation that AI systems can consume to understand the project's APIs, guides, and references.

How do I use Svelte's llms.txt with AI coding assistants?

Copy the llms.txt content and paste it into your AI assistant (Cursor, Windsurf, Claude, ChatGPT) as context. This gives the AI an accurate map of Svelte's documentation so it can provide better code suggestions and answers about Svelte.

What does Svelte's llms.txt contain?

Svelte's llms.txt contains 361 sections and 69 documentation links in 463.5 KB (~118.5k tokens). Key sections include Alternatives to SvelteKit, Editor tooling, Getting help, <script>, <script module>, <style>.

How many tokens does Svelte's llms.txt use?

The concise llms.txt index is approximately 118.5k tokens (463.5 KB). Most AI assistants can fit this within their context window. For the full expanded documentation, look for an llms-full.txt variant which embeds all content inline.

What is Svelte?

Cybernetically enhanced web apps. Svelte's llms.txt file helps AI systems understand this by providing a structured overview of its documentation, making it easier for developers to get accurate AI-assisted help when working with Svelte.

Can I generate an llms.txt for my own project?

Yes. Use the free llms.txt generator at mdream.dev/tools/llms-txt/generator to crawl your site and produce a spec-compliant llms.txt file. You can also validate existing files with the llms.txt validator.

## Browse More llms.txt Files

[Astro The web framework for content-driven websites](https://mdream.dev/llms-txt/svelte/llms-txt/astro) [Next.js The React Framework for the Web](https://mdream.dev/llms-txt/svelte/llms-txt/nextjs) [SolidJS Simple and performant reactivity for building user interfaces](https://mdream.dev/llms-txt/svelte/llms-txt/solidjs) [Nuxt The Intuitive Vue Framework](https://mdream.dev/llms-txt/svelte/llms-txt/nuxt) [Analog The fullstack Angular meta-framework](https://mdream.dev/llms-txt/svelte/llms-txt/analog) [Vue.js The Progressive JavaScript Framework](https://mdream.dev/llms-txt/svelte/llms-txt/vue) [Waku The minimal React framework](https://mdream.dev/llms-txt/svelte/llms-txt/waku) [Qt Documentation Comprehensive documentation for Qt and related products. Each product](https://mdream.dev/llms-txt/svelte/llms-txt/qt-documentation)

[View all 99 projects ](https://mdream.dev/llms-txt/svelte/llms-txt)

## Related Tools

[<h3>llms.txt Generator</h3>Generate an llms.txt for your own project.](https://mdream.dev/llms-txt/svelte/tools/llms-txt/generator) [<h3>llms.txt Validator</h3>Validate your llms.txt against the official spec.](https://mdream.dev/llms-txt/svelte/tools/llms-txt/validator)

© 2026 [Harlan Wilton](https://github.com/harlan-zw) · [MIT](https://github.com/harlan-zw/mdream/blob/main/license)

[GitHub](https://github.com/harlan-zw/mdream) [Discord](https://discord.com/invite/275MBUBvgP)