Coves frontend - a photon fork
at main 21 lines 446 B view raw
1<script lang="ts"> 2 import { expoOut } from 'svelte/easing' 3 import { Tween } from 'svelte/motion' 4 5 interface Props { 6 progress?: number 7 } 8 9 let { progress = 0 }: Props = $props() 10 11 let tween = new Tween(progress, { easing: expoOut }) 12 13 $effect(() => { 14 tween.set(progress) 15 }) 16</script> 17 18<div 19 class="bg-primary-900 dark:bg-primary-100 h-1 rounded-full" 20 style="width: {tween.current >= 0 ? tween.current * 100 : 0}%;" 21></div>