Stopwatch
Example
Usage
<script lang="ts">
import { Button } from '@fuxui/base';
import { Stopwatch, StopwatchState } from '@fuxui/time';
let stopwatch: StopwatchState | undefined = $state();
</script>
<Stopwatch bind:stopwatch />
<Button onclick={() => stopwatch?.start()}>Start</Button>
Credits
- Stopwatch state based on svelte-reactive-timer
- Moving numbers component from number-flow