diff options
| author | Bobby <[email protected]> | 2026-04-22 08:10:30 +0530 |
|---|---|---|
| committer | Bobby <[email protected]> | 2026-04-22 08:10:30 +0530 |
| commit | 0bb36660ec4bceeb4bd9b18cf47a30ba8eded427 (patch) | |
| tree | f94aa2de99dcb7ee87639a3f60539fd376577bb9 /lib/components/ProgressBar.svelte | |
| parent | e72162b34bddbf04998eea934335e9496b8649f8 (diff) | |
| download | hollowdark-0bb36660ec4bceeb4bd9b18cf47a30ba8eded427.tar.xz hollowdark-0bb36660ec4bceeb4bd9b18cf47a30ba8eded427.zip | |
Rename ui-lib to lib, split Begin into smaller components, add Credits, bump version to 1.0 from package.json
Diffstat (limited to 'lib/components/ProgressBar.svelte')
| -rw-r--r-- | lib/components/ProgressBar.svelte | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/lib/components/ProgressBar.svelte b/lib/components/ProgressBar.svelte new file mode 100644 index 0000000..21c9e68 --- /dev/null +++ b/lib/components/ProgressBar.svelte @@ -0,0 +1,34 @@ +<script lang="ts"> + interface Props { + value: number + width?: number + } + + let { value, width = 320 }: Props = $props() + + const percentage = $derived(Math.max(0, Math.min(1, value)) * 100) +</script> + +<div class="progress-track" style:width="{width}px"> + <div class="progress-fill" style:width="{percentage}%"></div> +</div> + +<style> + .progress-track { + height: 2px; + background: rgba(232, 226, 213, 0.06); + border-radius: 1px; + position: relative; + overflow: hidden; + } + + .progress-fill { + position: absolute; + top: 0; + left: 0; + height: 100%; + background: var(--color-accent); + border-radius: 1px; + transition: width 300ms ease-out; + } +</style> |
