You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/documentation/tutorial/09-motion/01-tweened/app-a/App.svelte

25 lines
484 B

<script>
import { writable } from 'svelte/store';
const progress = writable(0);
</script>
<progress value={$progress} />
<button on:click={() => progress.set(0)}> 0% </button>
<button on:click={() => progress.set(0.25)}> 25% </button>
<button on:click={() => progress.set(0.5)}> 50% </button>
<button on:click={() => progress.set(0.75)}> 75% </button>
<button on:click={() => progress.set(1)}> 100% </button>
<style>
progress {
display: block;
width: 100%;
}
</style>