UIPackage

Progress

Vue feedback
Edit on GitHub

Linear progress bar — determinate or indeterminate. Two visual densities (slim, default), four tones, and an optional inline percentage label.

Also available for React ->

Installation

$ npx shadcn-vue@latest add https://uipkge.dev/r/vue/progress.json

Or with the named registry: npx shadcn-vue@latest add @uipkge/progress

Examples

Props

Name Type / Values Default Required
class HTMLAttributes['class'] optional

Dependencies

Used by

Files (2)

  • app/components/ui/progress/Progress.vue 0.9 kB
    <script setup lang="ts">
    import type { ProgressRootProps } from 'reka-ui'
    import type { HTMLAttributes } from 'vue'
    import { reactiveOmit } from '@vueuse/core'
    import { ProgressIndicator, ProgressRoot } from 'reka-ui'
    import { cn } from '@/lib/utils'
    
    const props = withDefaults(defineProps<ProgressRootProps & { class?: HTMLAttributes['class'] }>(), {
      modelValue: 0,
    })
    
    const delegatedProps = reactiveOmit(props, 'class')
    </script>
    
    <template>
      <ProgressRoot
        data-uipkge
        data-slot="progress"
        v-bind="delegatedProps"
        :class="cn('bg-primary/20 relative h-2 w-full overflow-hidden rounded-full', props.class)"
      >
        <ProgressIndicator
          data-uipkge
          data-slot="progress-indicator"
          class="bg-primary h-full w-full flex-1 transition-colors duration-200"
          :style="`transform: translateX(-${100 - (props.modelValue ?? 0)}%);`"
        />
      </ProgressRoot>
    </template>
  • app/components/ui/progress/index.ts 0.1 kB
    export { default as Progress } from './Progress.vue'

Raw manifest: https://uipkge.dev/r/vue/progress.json