BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/dashboardblocks/usage-meter-04

usage-meter-04

dashboardblocks/usage-meter-04
FreeComponent

dashboardblocks publishes no description for this item.

Live preview

live · rendered by the registry
Rendered by dashboardblocks on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://dashboardblocks.com/r/usage-meter-04.json

Source

registry/components/dashboardblocks/usage-meter/usage-meter-04.tsxdashboardblocks.com/r/usage-meter-04.json
1'use client'
2
3import { AnimatedNumber } from '@/registry/components/dashboardblocks/animated-number'
4import { Icon } from '@/registry/components/dashboardblocks/icon'
5import { ProgressBar } from '@/registry/components/dashboardblocks/progress-bar'
6import { Trend } from '@/registry/components/dashboardblocks/trend'
7import { UsageMeterValue } from '@/registry/components/dashboardblocks/usage-meter'
8import { Coins } from 'lucide-react'
9
10import { Card, CardContent, CardTitle } from '@/components/ui/card'
11
12interface UsageMeter4Props {
13 remaining: number
14 title: string
15 total: number
16 trend: number
17}
18
19const exampleProps: UsageMeter4Props = {
20 remaining: 45750,
21 title: 'Credits Remaining',
22 total: 100000,
23 trend: -1250,
24}
25
26const UsageMeter4 = (props: UsageMeter4Props) => {
27 const { remaining, title, total, trend } = props
28 const used = total - remaining
29 const percentage = (used / total) * 100
30 const daysRemaining = Math.round(remaining / Math.abs(trend))
31
32 return (
33 <Card>
34 <CardContent className='space-y-3'>
35 <div className='flex items-center justify-between'>
36 <div className='flex items-center gap-2'>
37 <Icon icon={Coins} size='sm' />
38 <CardTitle>{title}</CardTitle>
39 </div>
40 <Trend
41 trend={trend}
42 formatter={(value) => `${value > 0 ? '+' : ''}${value.toLocaleString()}/day`}
43 />
44 </div>
45 <div>
46 <UsageMeterValue>
47 <AnimatedNumber
48 value={remaining}
49 formatter={(value) => value.toLocaleString()}
50 />
51 </UsageMeterValue>
52 <ProgressBar percentage={100 - percentage} fillClassName='bg-emerald-500' />
53 </div>
54 <div className='flex items-center justify-between text-sm text-muted-foreground'>
55 <span>
56 <AnimatedNumber value={used} formatter={(value) => value.toLocaleString()} />{' '}
57 used
58 </span>
59 <span>~{daysRemaining} days remaining</span>
60 </div>
61 </CardContent>
62 </Card>
63 )
64}
65
66export { UsageMeter4, exampleProps as usageMeter4ExampleProps, type UsageMeter4Props }

What it pulls in

Other registry items

  • card
  • https://dashboardblocks.com/r/animated-number.json
  • https://dashboardblocks.com/r/icon.json
  • https://dashboardblocks.com/r/progress-bar.json
  • https://dashboardblocks.com/r/trend.json
  • https://dashboardblocks.com/r/usage-meter.json

Files it writes

  • registry/components/dashboardblocks/usage-meter/usage-meter-04.tsx

Facts

Registry
dashboardblocks
Type
registry:component
Access
Free
Files written
1
Licence
MIT
First indexed
2026-08-03
Last confirmed
yesterday

Go to the source

Docs on dashboardblocks dashboardblocks.com LGLabGreg/dashboardblocks on GitHub Raw registry item This item as JSON

More from dashboardblocks

All 36 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Activity Feedactivity-feeddashboardblocksComponentsFree1 dep
activity-feed-01activity-feed-01dashboardblocksComponentsFree1 dep
activity-feed-02activity-feed-02dashboardblocksComponentsFree1 dep
activity-feed-03activity-feed-03dashboardblocksComponentsFree1 dep
activity-feed-04activity-feed-04dashboardblocksComponentsFree1 dep
activity-feed-05activity-feed-05dashboardblocksComponentsFree1 dep
Animated Numberanimated-numberdashboardblocksComponentsFreeno deps
Animated Waveanimated-wavedashboardblocksComponentsFreeno deps
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