Component
Address Display
Displays a shortened blockchain address with optional copy-to-clipboard support.
Preview
UxSo…1111
Installation
terminal
$npx shadcn@latest add https://uxdotsol.xyz/r/address-display.jsonUsage
address-display.tsx
import { AddressDisplay } from "@/components/uxdotsol/components/address-display"; export default function App() { return ( <> <AddressDisplay address="UxSol1111111111111111111111111111111111111" /> <AddressDisplay address="UxSol1111111111111111111111111111111111111" variant="hover-actions" actions={["copy", "explorer", "more"]} /> </> );}Props / Arguments
| Name | Type | Default | Description |
|---|---|---|---|
| variant | "default" | "hover-actions" | "default" | Default keeps the address and copy icon visible. Hover actions reveals the expandable action surface on hover, focus, or tap. |
| address | string | required | The full on-chain address string to display (e.g. a base-58 public key). |
| truncate | boolean | true | When true, addresses longer than 10 characters are shortened to AAAA...ZZZZ format. |
| copyable | boolean | true | When true, the address and copy action copy the full value and show a brief confirmation icon. |
| actions | ("copy" | "explorer" | "more")[] | ["copy", "explorer", "more"] | Only applies to variant="hover-actions". Controls the capsule actions; defaults to no actions when copyable is false. |
| cluster | "mainnet-beta" | "devnet" | "testnet" | "mainnet-beta" | Sets the Solana cluster query used by explorer links. |
| explorer / explorerUrl | "explorer" | "solscan" / string | "explorer" / undefined | Selects Solana Explorer or Solscan, or supplies a custom explorer base URL. |

