BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/dashboardblocks/kpi

KPI

dashboardblocks/kpi
FreeComponent

A flexible KPI card with trend indicators, sparklines, and progress tracking.

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/kpi.json

Source

registry/components/dashboardblocks/kpi.tsxdashboardblocks.com/r/kpi.json
1'use client'
2
3import { AnimatedNumber } from '@/registry/components/dashboardblocks/animated-number'
4import { ComponentProps } from 'react'
5
6import { Card, CardContent } from '@/components/ui/card'
7
8import { cn } from '@/lib/utils'
9
10export const KPI = (props: ComponentProps<typeof Card>) => {
11 return <Card {...props} />
12}
13
14export const KPIContent = (props: ComponentProps<typeof CardContent>) => {
15 return (
16 <CardContent
17 {...props}
18 className={cn('flex flex-col flex-1 justify-between', props.className)}
19 />
20 )
21}
22
23interface KPIValueProps {
24 animated?: boolean
25 className?: string
26 formatter?: (value: number) => string
27 value: number
28}
29
30const defaultFormatter = (value: number): string => value.toLocaleString()
31
32export const KPIValue = ({
33 animated = false,
34 className = '',
35 formatter = defaultFormatter,
36 value,
37}: KPIValueProps) => {
38 const displayValue = animated ? (
39 <AnimatedNumber value={value} formatter={formatter} />
40 ) : (
41 formatter(value)
42 )
43
44 return <div className={`text-3xl font-bold ${className}`}>{displayValue}</div>
45}
46
47export type { KPIValueProps }

What it pulls in

Other registry items

  • card

Files it writes

  • registry/components/dashboardblocks/kpi.tsx

Facts

Registry
dashboardblocks
Type
registry:component
Access
Free
Files written
1
Licence
MIT
First indexed
2026-08-01
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