Skip to main content
Create new
Introduction
Reactivity
Props
Logic
Events
Bindings
Lifecycle
Stores
Motion
Transitions
Animations
Easing
SVG
Actions
Classes
Component composition
Context API
Special elements
Module context
Debugging
7GUIs
Miscellaneous
App.svelte
Data.svelte
Dynamic.svelte
ObjectQuery.svelte
Recursion.svelte
Store.svelte
<script>
import MediaQuery from 'svelte-media-queries'
import Dynamic from './Dynamic.svelte'
import Recursion from './Recursion.svelte'
import ObjectQuery from './ObjectQuery.svelte'
import Store from './Store.svelte'
let mobile
let innerWidth = 0
</script>
<svelte:window bind:innerWidth/>
<main>
<h1>
Change the size of this area {innerWidth}px🐥
</h1>
<h2>
Dynamic parameters (smart🐹)
</h2>
<Dynamic/>
<hr>
<h2>
Svelte store
</h2>
<Store/>
<hr>

<h2>
Slot and the <code>let:</code> directive<i>boolean</i>
</h2>
<code>'(min-width: 200px)'</code>
<MediaQuery query='(min-width: 200px)' let:matches>
<h5>
loading Svelte compiler...
/* Select a component to see its compiled code */
result = svelte.compile(source, {
generate: ,
});
/* Select a component to see its compiled code */