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/address-display

Address display

bitcoin-ui/address-display
FreeComponent

Copyable Bitcoin address with network and script metadata.

Install it

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

Source

components/bitcoin/address-display.tsxraw.githubusercontent.com/dennisonbertram/bitcoin-ui/main/public/r/address-display.json
1import type { ComponentProps } from "react";
2
3import type { BitcoinNetwork, ScriptType } from "@/lib/bitcoin";
4import { componentClasses } from "@/lib/utils";
5
6import { HashDisplay } from "./hash-display";
7import { NetworkBadge } from "./network-badge";
8import { ScriptBadge } from "./script-badge";
9import { type BitcoinVisualProps } from "./shared";
10
11export type AddressDisplayProps = Omit<ComponentProps<"div">, "children"> &
12 BitcoinVisualProps & {
13 address: string;
14 network?: BitcoinNetwork;
15 scriptType?: ScriptType;
16 label?: string;
17 href?: string;
18 copyable?: boolean;
19 };
20
21export function AddressDisplay({
22 address,
23 network,
24 scriptType,
25 label,
26 href,
27 copyable = true,
28 unstyled,
29 className,
30 ...props
31}: AddressDisplayProps) {
32 return (
33 <div
34 data-slot="address-display"
35 data-unstyled={unstyled || undefined}
36 className={componentClasses(unstyled, "grid min-w-0 gap-2", className)}
37 {...props}
38 >
39 {label ? (
40 <span
41 data-slot="address-display-label"
42 className={componentClasses(
43 unstyled,
44 "text-xs text-[var(--color-muted)]",
45 )}
46 >
47 {label}
48 </span>
49 ) : null}
50 <HashDisplay
51 value={address}
52 label="Address"
53 href={href}
54 copyable={copyable}
55 startCharacters={12}
56 endCharacters={8}
57 unstyled={unstyled}
58 />
59 {network || scriptType ? (
60 <div
61 data-slot="address-display-meta"
62 className={componentClasses(unstyled, "flex flex-wrap gap-2")}
63 >
64 {network ? (
65 <NetworkBadge network={network} unstyled={unstyled} />
66 ) : null}
67 {scriptType ? (
68 <ScriptBadge type={scriptType} unstyled={unstyled} />
69 ) : null}
70 </div>
71 ) : null}
72 </div>
73 );
74}

What it pulls in

Other registry items

  • dennisonbertram/bitcoin-ui/hash-display
  • dennisonbertram/bitcoin-ui/protocol-badges

Files it writes

  • components/bitcoin/address-display.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
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
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