File transfer
Show known bytes transferred relative to total bytes.
Components / Display
A native progress element for determinate or indeterminate work.
npx @getweini/cli@latest add progressShow known bytes transferred relative to total bytes.
Show that a request is still running when completion cannot be measured.
<script setup lang="ts">
import { ref } from 'vue'
import Progress from './components/ui/progress/Progress.vue'
const uploaded = ref(42)
</script>
<template>
<Progress :value="uploaded" :max="100" aria-label="Upload progress" />
<Progress :value="null" aria-label="Preparing upload" />
</template>Use a numeric value and a visible text equivalent.
<script setup lang="ts">
import { ref } from 'vue'
import Progress from './components/ui/progress/Progress.vue'
const uploaded = ref(64)
</script>
<template>
<div><p>Uploading files: {{ uploaded }}%</p><Progress :value="uploaded" :max="100" aria-label="File upload" /></div>
</template>Pass null until the job exposes a measurable total.
<script setup lang="ts">
import Progress from './components/ui/progress/Progress.vue'
</script>
<template>
<div><p>Preparing report…</p><Progress :value="null" aria-label="Preparing report" /></div>
</template>The most useful props, models, slots, events, and methods for this component.
| Name | Type | Default or requirement |
|---|---|---|
value | number | null | indeterminate |
max | number | 100 |
size | sm | md | lg | md |
variant | default | success | warning | destructive | default |
Omit value or pass null for indeterminate progress. Supply aria-label or aria-labelledby, and use aria-valuetext when the numeric value does not express the user-facing state.