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 https://svelte.dev/docs/svelte/svelte-motion#prefersReducedMotion
- demo https://svelte.dev/playground/89f6f3bb738149fcb6e708cfce878e0f?version=5.7.0
there's more!
- docs https://svelte.dev/docs/svelte/svelte-motion#prefersReducedMotion
- demo https://svelte.dev/playground/89f6f3bb738149fcb6e708cfce878e0f?version=5.7.0
there's more!
Comments
- docs https://svelte.dev/docs/svelte/svelte-reactivity#createSubscriber
🎁 tutorial https://svelte.dev/tutorial/svelte/tweens
🎁 docs https://svelte.dev/docs/svelte/svelte-motion
🎁 demo https://svelte.dev/playground/8a021b2ec2064230bde4a10b08464876?version=5.8.0
🎁 https://svelte.dev/tutorial
bind:value={getValue, setValue}
...which lets you transform and validate data
🎁 docs https://svelte.dev/docs/svelte/bind#Function-bindings
🎁 demo https://svelte.dev/playground/1ddd82f573b94201b3c8fcab33bf0a46?version=5.9.0
get/set continues to chalk up wins
🎁 demo https://svelte.dev/playground/8095884c1f5040ea846669b904083e25?version=5.10.0
🎁 docs https://svelte.dev/docs/kit/hooks#Shared-hooks-init