BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/ak-ui/progress

AK Progress

ak-ui/progress
FreeComponent

Accessible horizontal progress and octagonal gauge adapters with clamped values.

Install it

npx shadcn@latest add https://ak-ui.yunyoujun.cn/r/progress.json

Source

registry/ak/ui/progress/AkProgress.vueak-ui.yunyoujun.cn/r/progress.json
1<script setup lang="ts">
2import { computed } from 'vue'
3import type { CSSProperties } from 'vue'
4import type { AkProgressVariant } from './types'
5
6import '@yunyoujun/ak-ui'
7
8const props = withDefaults(defineProps<{
9 label?: string
10 max?: number
11 min?: number
12 value?: number
13 valueLabel?: string
14 variant?: AkProgressVariant
15}>(), {
16 label: 'Progress',
17 max: 100,
18 min: 0,
19 value: 0,
20 valueLabel: '',
21 variant: 'default',
22})
23
24const normalizedValue = computed(() => Math.min(props.max, Math.max(props.min, props.value)))
25const percentage = computed(() => {
26 const range = props.max - props.min
27 return range > 0 ? ((normalizedValue.value - props.min) / range) * 100 : 0
28})
29const progressStyle = computed(() => ({
30 '--ak-progress-value': `${percentage.value}%`,
31}) as CSSProperties)
32</script>
33
34<template>
35 <div
36 class="ak-progress"
37 data-slot="ak-progress"
38 role="progressbar"
39 :aria-label="label"
40 :aria-valuemax="max"
41 :aria-valuemin="min"
42 :aria-valuenow="normalizedValue"
43 :class="variant !== 'default' && `ak-progress--${variant}`"
44 :data-variant="variant"
45 :style="progressStyle"
46 >
47 <div class="ak-progress__header">
48 <span><slot name="label">{{ label }}</slot></span>
49 <span class="ak-progress__value"><slot name="value">{{ valueLabel || `${Math.round(percentage)}%` }}</slot></span>
50 </div>
51 <div class="ak-progress__track"><span class="ak-progress__fill" /></div>
52 </div>
53</template>

What it pulls in

npm packages

  • @yunyoujun/ak-ui@0.2.0

Files it writes

  • registry/ak/ui/progress/AkProgress.vue
  • registry/ak/ui/progress/AkGauge.vue
  • registry/ak/ui/progress/index.ts
  • registry/ak/ui/progress/types.ts

Facts

Registry
ak-ui
Type
registry:ui
Access
Free
Files written
4
Licence
MIT
First indexed
2026-08-02
Last confirmed
2 days ago

Go to the source

ak-ui.yunyoujun.cn YunYouJun/ak-ui on GitHub Raw registry item This item as JSON

More from ak-ui

All 7 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
AK Buttonbuttonak-uiComponentsFree1 dep · 3 files
AK Cardcardak-uiComponentsFree1 dep · 8 files
AK Input Numberinput-numberak-uiComponentsFree1 dep · 2 files
AK Noticenoticeak-uiComponentsFree1 dep · 3 files
AK Statusstatusak-uiComponentsFree1 dep · 4 files
AK Tabstabsak-uiComponentsFree1 dep · 4 files
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex