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/bitcoin-motion

Bitcoin motion

bitcoin-ui/bitcoin-motion
FreeComponent

Accessible confirmation, mempool, proof-of-work, UTXO, and Merkle motion primitives.

Install it

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

Source

components/bitcoin/bitcoin-motion.tsxraw.githubusercontent.com/dennisonbertram/bitcoin-ui/main/public/r/bitcoin-motion.json · first 6 KB
1"use client";
2
3import {
4 useId,
5 useState,
6 type ComponentProps,
7 type CSSProperties,
8} from "react";
9
10import {
11 clampPercent,
12 formatFeeRate,
13 formatSats,
14 formatWeight,
15 truncateMiddle,
16 type SatoshiValue,
17} from "@/lib/bitcoin";
18import { componentClasses } from "@/lib/utils";
19
20import styles from "./bitcoin-motion.module.css";
21import type { BitcoinVisualProps } from "./shared";
22
23type MotionProps = BitcoinVisualProps & {
24 /** Pauses motion without changing the represented state. @default false */
25 paused?: boolean;
26};
27
28type MotionStyle = CSSProperties & {
29 "--motion-column"?: number;
30 "--motion-index"?: number;
31 "--motion-lane"?: number;
32};
33
34export type AnimatedConfirmationsProps = Omit<
35 ComponentProps<"div">,
36 "children"
37> &
38 MotionProps & {
39 confirmations: number;
40 /** Confirmation target represented by the relay. @default 6 */
41 target?: number;
42 };
43
44export function AnimatedConfirmations({
45 confirmations,
46 target = 6,
47 paused,
48 unstyled,
49 className,
50 ...props
51}: AnimatedConfirmationsProps) {
52 const safeTarget = Math.max(1, Math.floor(target));
53 const safeConfirmations = Math.max(0, Math.floor(confirmations));
54 const boundedConfirmations = Math.min(safeConfirmations, safeTarget);
55 const remaining = Math.max(0, safeTarget - boundedConfirmations);
56 const complete = boundedConfirmations >= safeTarget;
57 const valueText = complete
58 ? `${safeConfirmations} confirmations, finality target reached`
59 : `${boundedConfirmations} of ${safeTarget} confirmations`;
60
61 return (
62 <div
63 data-slot="animated-confirmations"
64 data-state={complete ? "complete" : "confirming"}
65 data-paused={paused || undefined}
66 data-unstyled={unstyled || undefined}
67 className={componentClasses(
68 unstyled,
69 styles.confirmations,
70 className,
71 )}
72 {...props}
73 >
74 <header className={componentClasses(unstyled, styles.motionHeader)}>
75 <span>Confirmation relay</span>
76 <output aria-live="polite">
77 {boundedConfirmations} / {safeTarget}
78 </output>
79 </header>
80 <div
81 data-slot="animated-confirmations-progress"
82 role="progressbar"
83 aria-label="Transaction confirmation relay"
84 aria-valuemin={0}
85 aria-valuemax={safeTarget}
86 aria-valuenow={boundedConfirmations}
87 aria-valuetext={valueText}
88 className={componentClasses(unstyled, styles.confirmationProgress)}
89 >
90 <ol
91// … truncated

What it pulls in

Other registry items

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

Files it writes

  • components/bitcoin/bitcoin-motion.tsx
  • components/bitcoin/bitcoin-motion.module.css

Facts

Registry
bitcoin-ui
Type
registry:component
Access
Free
Files written
2
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 searchbitcoin-searchbitcoin-uiComponentsFree1 dep
Block cardblock-cardbitcoin-uiComponentsFree1 dep
Block listblock-listbitcoin-uiComponentsFreeno deps
Confirmation progressconfirmation-progressbitcoin-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