Hash
Compact middle-truncated display for addresses and hashes.
Demo
Address0xd8dA6BF26964aF9D7eEd9…e03E53415D37aA96045
Transaction hash0xa1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e…5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2
Contract0x420000000000000000000…0000000000000000006
Format helper
import { formatHash } from 'regen-ui'
formatHash('0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045')
// "0xd8dA…6045"Usage
import { Hash } from 'regen-ui'
export function AddressLabel() {
return <Hash copy value="0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045" />
}API Reference
Hash.Props
| Name | Type | Default | Description |
|---|---|---|---|
copy | boolean | false | Show an inline copy button after the hash. |
min | number | 4 | Minimum number of body characters to keep visible on each side. |
value | string | None | Hash or address value to display. |
Inherits HTMLAttributes<HTMLSpanElement>, except children. | |||
copyType
booleanDefault
Show an inline copy button after the hash.falseminType
numberDefault
Minimum number of body characters to keep visible on each side.4valueType
stringDefaultNone
Hash or address value to display.Inherits
HTMLAttributes<HTMLSpanElement>, except children.