BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/bitcoin-ui/confirmation-progress

Confirmation progress

bitcoin-ui/confirmation-progress
FreeComponent

Accessible transaction confirmation progress.

Install it

npx shadcn@latest add https://raw.githubusercontent.com/dennisonbertram/bitcoin-ui/main/public/r/confirmation-progress.json

Source

components/bitcoin/confirmation-progress.tsxraw.githubusercontent.com/dennisonbertram/bitcoin-ui/main/public/r/confirmation-progress.json
1import type { ComponentProps } from "react";
2
3import { clampPercent } from "@/lib/bitcoin";
4import { componentClasses } from "@/lib/utils";
5
6import type { BitcoinVisualProps } from "./shared";
7
8export type ConfirmationProgressProps = Omit<
9 ComponentProps<"div">,
10 "children"
11> &
12 BitcoinVisualProps & {
13 confirmations: number;
14 /** Confirmation target used for the progress calculation. @default 6 */
15 target?: number;
16 /** Shows the confirmation count beneath the track. @default true */
17 showLabel?: boolean;
18 };
19
20export function ConfirmationProgress({
21 confirmations,
22 target = 6,
23 showLabel = true,
24 unstyled,
25 className,
26 ...props
27}: ConfirmationProgressProps) {
28 const safeTarget = Math.max(1, target);
29 const safeConfirmations = Math.max(0, confirmations);
30 const percent = clampPercent((safeConfirmations / safeTarget) * 100);
31 const complete = safeConfirmations >= safeTarget;
32 const label = complete
33 ? `${safeConfirmations} confirmations, final`
34 : `${safeConfirmations} of ${safeTarget} confirmations`;
35
36 return (
37 <div
38 data-slot="confirmation-progress"
39 data-state={complete ? "complete" : "confirming"}
40 data-unstyled={unstyled || undefined}
41 className={componentClasses(
42 unstyled,
43 "grid min-w-32 gap-1.5",
44 className,
45 )}
46 {...props}
47 >
48 <div
49 data-slot="confirmation-progress-track"
50 role="progressbar"
51 aria-label="Transaction confirmations"
52 aria-valuemin={0}
53 aria-valuemax={safeTarget}
54 aria-valuenow={Math.min(safeConfirmations, safeTarget)}
55 aria-valuetext={label}
56 className={componentClasses(
57 unstyled,
58 "h-1.5 overflow-hidden rounded-[var(--radius-full)] bg-[var(--color-surface-active)]",
59 )}
60 >
61 <span
62 data-slot="confirmation-progress-value"
63 aria-hidden="true"
64 className={componentClasses(
65 unstyled,
66 "block h-full rounded-[var(--radius-full)] bg-[var(--color-bitcoin)]",
67 )}
68 style={{ width: `${percent}%` }}
69 />
70 </div>
71 {showLabel ? (
72 <span
73 data-slot="confirmation-progress-label"
74 className={componentClasses(
75 unstyled,
76 "text-xs text-[var(--color-muted)]",
77 )}
78 >
79 {complete
80 ? `${safeConfirmations} confirmations`
81 : `${safeConfirmations} / ${safeTarget} confirmations`}
82// … truncated

What it pulls in

Other registry items

  • dennisonbertram/bitcoin-ui/bitcoin-core
  • dennisonbertram/bitcoin-ui/bitcoin-theme

Files it writes

  • components/bitcoin/confirmation-progress.tsx

Facts

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

Go to the source

dennisonbertram.github.io dennisonbertram/bitcoin-ui on GitHub Raw registry item This item as JSON

More from bitcoin-ui

All 23 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Address displayaddress-displaybitcoin-uiComponentsFreeno deps
Bitcoin amountbitcoin-amountbitcoin-uiComponentsFreeno deps
Bitcoin motionbitcoin-motionbitcoin-uiComponentsFreeno deps · 2 files
Bitcoin searchbitcoin-searchbitcoin-uiComponentsFree1 dep
Block cardblock-cardbitcoin-uiComponentsFree1 dep
Block listblock-listbitcoin-uiComponentsFreeno deps
Difficulty adjustmentdifficulty-adjustmentbitcoin-uiComponentsFreeno deps
Fee estimatesfee-estimatesbitcoin-uiComponentsFree1 dep
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