Svelte
@svelte.dev
Web development for the rest of us. See also:
- community: @sveltesociety.dev
- starter pack: https://bsky.app/starter-pack/did:plc:nlvjelw3dy3pddq7qoglleko/3l6ucetngs423
- feed: https://bsky.app/profile/paolo.ricciuti.me/feed/svelte-feed
- community: @sveltesociety.dev
- starter pack: https://bsky.app/starter-pack/did:plc:nlvjelw3dy3pddq7qoglleko/3l6ucetngs423
- feed: https://bsky.app/profile/paolo.ricciuti.me/feed/svelte-feed
Day 24 — Svelte now handles `class` attributes with github.com/lukeed/clsx. Much more powerful than the `class:` directive, but since this is Svelte you still get dead code elimination of unused styles!
🎁 docs svelte.dev/docs/svelte/...
🎁 demo svelte.dev/playground/6...
🎁 docs svelte.dev/docs/svelte/...
🎁 demo svelte.dev/playground/6...
December 24, 2024 at 4:13 PM
Day 24 — Svelte now handles `class` attributes with github.com/lukeed/clsx. Much more powerful than the `class:` directive, but since this is Svelte you still get dead code elimination of unused styles!
🎁 docs svelte.dev/docs/svelte/...
🎁 demo svelte.dev/playground/6...
🎁 docs svelte.dev/docs/svelte/...
🎁 demo svelte.dev/playground/6...
Day 23 — you can now download your playground creations as SvelteKit apps! It'll even include any dependencies you've imported
🎁 svelte.dev/playground
🎁 svelte.dev/playground
December 23, 2024 at 5:05 PM
Day 23 — you can now download your playground creations as SvelteKit apps! It'll even include any dependencies you've imported
🎁 svelte.dev/playground
🎁 svelte.dev/playground
Day 22 — you can now use the `bundleStrategy: 'inline'` option to build an entire SvelteKit app — code, styles, fonts, images, audio, and so on — into a single `.html` file that you can share on a floppy disk
🎁 docs svelte.dev/docs/kit/con...
🎁 demo svelte-snek.vercel.app (needs keyboard for now!)
🎁 docs svelte.dev/docs/kit/con...
🎁 demo svelte-snek.vercel.app (needs keyboard for now!)
December 22, 2024 at 5:49 PM
Day 22 — you can now use the `bundleStrategy: 'inline'` option to build an entire SvelteKit app — code, styles, fonts, images, audio, and so on — into a single `.html` file that you can share on a floppy disk
🎁 docs svelte.dev/docs/kit/con...
🎁 demo svelte-snek.vercel.app (needs keyboard for now!)
🎁 docs svelte.dev/docs/kit/con...
🎁 demo svelte-snek.vercel.app (needs keyboard for now!)
Day 20 — Vim mode! You can enable it in the playground and tutorial and it will remember your preference between visits. Don't worry, you can always quit by turning it off again (or closing the tab)
🎁 svelte.dev/playground
🎁 svelte.dev/playground
December 20, 2024 at 2:21 PM
Day 20 — Vim mode! You can enable it in the playground and tutorial and it will remember your preference between visits. Don't worry, you can always quit by turning it off again (or closing the tab)
🎁 svelte.dev/playground
🎁 svelte.dev/playground
Day 19 — single-file bundles for SvelteKit. By default, your apps use code-splitting to ensure that you only load the code for the current page. But sometimes you need a single bundle for the whole app, and you can now do that with the new `bundleStrategy` option
🎁 docs svelte.dev/docs/kit/con...
🎁 docs svelte.dev/docs/kit/con...
December 19, 2024 at 3:16 PM
Day 19 — single-file bundles for SvelteKit. By default, your apps use code-splitting to ensure that you only load the code for the current page. But sometimes you need a single bundle for the whole app, and you can now do that with the new `bundleStrategy` option
🎁 docs svelte.dev/docs/kit/con...
🎁 docs svelte.dev/docs/kit/con...
Day 18 — we've upgraded the playground so you can better understand how the compiler transforms your code. We plan to use this tool ourselves to improve the sourcemaps that Svelte generates
🎁 svelte.dev/playground
🎁 svelte.dev/playground
December 18, 2024 at 2:22 PM
Day 18 — we've upgraded the playground so you can better understand how the compiler transforms your code. We plan to use this tool ourselves to improve the sourcemaps that Svelte generates
🎁 svelte.dev/playground
🎁 svelte.dev/playground
Day 17 — until today, intellisense would often fail when you were in the middle of writing components, because Svelte's parser crashed on syntax errors.
We just fixed that. Install svelte@latest, make sure your extensions are up to date, and feel the wind in your hair as you write your components
We just fixed that. Install svelte@latest, make sure your extensions are up to date, and feel the wind in your hair as you write your components
December 17, 2024 at 4:16 PM
Day 17 — until today, intellisense would often fail when you were in the middle of writing components, because Svelte's parser crashed on syntax errors.
We just fixed that. Install svelte@latest, make sure your extensions are up to date, and feel the wind in your hair as you write your components
We just fixed that. Install svelte@latest, make sure your extensions are up to date, and feel the wind in your hair as you write your components
Day 15 — the new `$inspect.trace(...)` rune gives you debugging superpowers. Add it to a function that runs inside a derived or effect, and you'll see detailed information about what caused it to re-run
🎁 docs svelte.dev/docs/svelte/...
🎁 demo svelte.dev/playground/d...
🎁 docs svelte.dev/docs/svelte/...
🎁 demo svelte.dev/playground/d...
December 15, 2024 at 3:24 PM
Day 15 — the new `$inspect.trace(...)` rune gives you debugging superpowers. Add it to a function that runs inside a derived or effect, and you'll see detailed information about what caused it to re-run
🎁 docs svelte.dev/docs/svelte/...
🎁 demo svelte.dev/playground/d...
🎁 docs svelte.dev/docs/svelte/...
🎁 demo svelte.dev/playground/d...
Day 14 — if you need to programmatically mount and unmount a component, you can now pass an `outro: true` option to `unmount` to play transitions before it is removed from the DOM
🎁 docs svelte.dev/docs/svelte/...
🎁 demo svelte.dev/playground/a...
🎁 docs svelte.dev/docs/svelte/...
🎁 demo svelte.dev/playground/a...
December 14, 2024 at 2:35 PM
Day 14 — if you need to programmatically mount and unmount a component, you can now pass an `outro: true` option to `unmount` to play transitions before it is removed from the DOM
🎁 docs svelte.dev/docs/svelte/...
🎁 demo svelte.dev/playground/a...
🎁 docs svelte.dev/docs/svelte/...
🎁 demo svelte.dev/playground/a...
Day 12 — send custom types across the network boundary in SvelteKit, whether it's a class containing reactive state, a class used by your database ORM library, or whatever. Just export a `transport` object from your `hooks.js`
🎁 docs svelte.dev/docs/kit/hoo...
🎁 demo stackblitz.com/edit/sveltej...
🎁 docs svelte.dev/docs/kit/hoo...
🎁 demo stackblitz.com/edit/sveltej...
December 12, 2024 at 4:00 PM
Day 12 — send custom types across the network boundary in SvelteKit, whether it's a class containing reactive state, a class used by your database ORM library, or whatever. Just export a `transport` object from your `hooks.js`
🎁 docs svelte.dev/docs/kit/hoo...
🎁 demo stackblitz.com/edit/sveltej...
🎁 docs svelte.dev/docs/kit/hoo...
🎁 demo stackblitz.com/edit/sveltej...
Day 11 — a whole new module, for getting reactive views of window properties like innerWidth, innerHeight, scrollX, scrollY and so on. Like the bindings on but with less boilerplate
🎁 docs svelte.dev/docs/svelte/...
🎁 demo svelte.dev/playground/8...
🎁 docs svelte.dev/docs/svelte/...
🎁 demo svelte.dev/playground/8...
December 11, 2024 at 4:54 PM
Day 11 — a whole new module, for getting reactive views of window properties like innerWidth, innerHeight, scrollX, scrollY and so on. Like the bindings on but with less boilerplate
🎁 docs svelte.dev/docs/svelte/...
🎁 demo svelte.dev/playground/8...
🎁 docs svelte.dev/docs/svelte/...
🎁 demo svelte.dev/playground/8...
Day 9 — warnings and errors emitted by the compiler, or while your app is running, are now accompanied by links to the docs. Over time, we'll flesh out these docs with more details about what caused the error in question
🎁 demo svelte.dev/playground/8...
🎁 demo svelte.dev/playground/8...
December 9, 2024 at 6:51 PM
Day 9 — warnings and errors emitted by the compiler, or while your app is running, are now accompanied by links to the docs. Over time, we'll flesh out these docs with more details about what caused the error in question
🎁 demo svelte.dev/playground/8...
🎁 demo svelte.dev/playground/8...
Day 8 — we're calling this 'function bindings'. You know how you can do `bind:value={value}`? You can now do this...
bind:value={getValue, setValue}
...which lets you transform and validate data
🎁 docs svelte.dev/docs/svelte/...
🎁 demo svelte.dev/playground/1...
bind:value={getValue, setValue}
...which lets you transform and validate data
🎁 docs svelte.dev/docs/svelte/...
🎁 demo svelte.dev/playground/1...
December 8, 2024 at 10:14 PM
Day 8 — we're calling this 'function bindings'. You know how you can do `bind:value={value}`? You can now do this...
bind:value={getValue, setValue}
...which lets you transform and validate data
🎁 docs svelte.dev/docs/svelte/...
🎁 demo svelte.dev/playground/1...
bind:value={getValue, setValue}
...which lets you transform and validate data
🎁 docs svelte.dev/docs/svelte/...
🎁 demo svelte.dev/playground/1...
Day 7 — the first of a few planned improvements to the site. A lot of you (rightly!) disliked the tutorial dropdown navigation, so we fixed it. You can even navigate the tutorial with JS disabled, if you're so inclined
🎁 svelte.dev/tutorial
🎁 svelte.dev/tutorial
December 7, 2024 at 3:56 PM
Day 7 — the first of a few planned improvements to the site. A lot of you (rightly!) disliked the tutorial dropdown navigation, so we fixed it. You can even navigate the tutorial with JS disabled, if you're so inclined
🎁 svelte.dev/tutorial
🎁 svelte.dev/tutorial
Aside from Advent of Svelte, we've also been shipping a bunch of minor bugfixes and improvements. For example, `if` blocks are now treeshakeable — if you have a condition that can be known statically, like `{#if BROWSER}`, then dead code will be eliminated by a minifier
December 6, 2024 at 6:17 PM
Aside from Advent of Svelte, we've also been shipping a bunch of minor bugfixes and improvements. For example, `if` blocks are now treeshakeable — if you have a condition that can be known statically, like `{#if BROWSER}`, then dead code will be eliminated by a minifier
Day 6 — we now have modern state-based Spring and Tween classes for adding motion to your UI, replacing the `spring`/`tweened` stores of old. Smooth!
🎁 tutorial svelte.dev/tutorial/sve...
🎁 docs svelte.dev/docs/svelte/...
🎁 demo svelte.dev/playground/8...
🎁 tutorial svelte.dev/tutorial/sve...
🎁 docs svelte.dev/docs/svelte/...
🎁 demo svelte.dev/playground/8...
December 6, 2024 at 3:21 PM
Day 6 — we now have modern state-based Spring and Tween classes for adding motion to your UI, replacing the `spring`/`tweened` stores of old. Smooth!
🎁 tutorial svelte.dev/tutorial/sve...
🎁 docs svelte.dev/docs/svelte/...
🎁 demo svelte.dev/playground/8...
🎁 tutorial svelte.dev/tutorial/sve...
🎁 docs svelte.dev/docs/svelte/...
🎁 demo svelte.dev/playground/8...
Day 5 — it's a three-in-one kind of day! `new MediaQuery(...)` lets you use media queries reactively. prefersReducedMotion is an instance of MediaQuery that makes it easier to respect users' accessibility preferences
- docs svelte.dev/docs/svelte/...
- demo svelte.dev/playground/8...
there's more!
- docs svelte.dev/docs/svelte/...
- demo svelte.dev/playground/8...
there's more!
December 5, 2024 at 3:53 PM
Day 5 — it's a three-in-one kind of day! `new MediaQuery(...)` lets you use media queries reactively. prefersReducedMotion is an instance of MediaQuery that makes it easier to respect users' accessibility preferences
- docs svelte.dev/docs/svelte/...
- demo svelte.dev/playground/8...
there's more!
- docs svelte.dev/docs/svelte/...
- demo svelte.dev/playground/8...
there's more!
Day 4 — specify a `defaultValue` on form inputs, and it will be used when the form is reset
- docs svelte.dev/docs/svelte/...
- demo svelte.dev/playground/b...
- docs svelte.dev/docs/svelte/...
- demo svelte.dev/playground/b...
December 4, 2024 at 4:56 PM
Day 4 — specify a `defaultValue` on form inputs, and it will be used when the form is reset
- docs svelte.dev/docs/svelte/...
- demo svelte.dev/playground/b...
- docs svelte.dev/docs/svelte/...
- demo svelte.dev/playground/b...
Day 3 — you can now export snippets from a
Day 2 — `each` without `as`, for when you just want lots of one thing
- docs svelte.dev/docs/svelte/...
- demo svelte.dev/playground/e...
- docs svelte.dev/docs/svelte/...
- demo svelte.dev/playground/e...
December 2, 2024 at 2:49 PM
Day 2 — `each` without `as`, for when you just want lots of one thing
- docs svelte.dev/docs/svelte/...
- demo svelte.dev/playground/e...
- docs svelte.dev/docs/svelte/...
- demo svelte.dev/playground/e...
Day 1 — error boundaries! Wrap your code in a and you can isolate and recover from unexpected errors.
🎁 docs svelte.dev/docs/svelte/...
🎁 tutorial svelte.dev/tutorial/sve...
🎁 docs svelte.dev/docs/svelte/...
🎁 tutorial svelte.dev/tutorial/sve...
December 1, 2024 at 3:15 PM
Day 1 — error boundaries! Wrap your code in a and you can isolate and recover from unexpected errors.
🎁 docs svelte.dev/docs/svelte/...
🎁 tutorial svelte.dev/tutorial/sve...
🎁 docs svelte.dev/docs/svelte/...
🎁 tutorial svelte.dev/tutorial/sve...
English
300
Connect Bluesky
Enter your Bluesky handle and app password to unlock posting, likes, and your Following feed.
Need an app password? Open Bluesky, go to Settings > App passwords, and create a new one.
Connect with Bluesky
Sign in with your Bluesky account to unlock posting, likes, and your Following feed.