Bitcoin Value
Example
Section titled “Example”Import
Section titled “Import”import '@sbddesign/bui-ui/bitcoin-value.js'import { BuiBitcoinValueReact as BuiBitcoinValue } from '@sbddesign/bui-ui/react'<bui-bitcoin-value amount="1000"></bui-bitcoin-value><BuiBitcoinValue amount="1000"></BuiBitcoinValue>Properties
Section titled “Properties”| Property | Attribute | Type | Required | Reflected | Description |
|---|---|---|---|---|---|
format | format | string | No | Yes | Bitcoin format: “sats”, “BTC”, “bip177” |
truncated | truncated | boolean | No | Yes | Whether to truncate large numbers |
amount | amount | number | No | Yes | Bitcoin amount in satoshis |
symbolPosition | symbol-position | string | No | Yes | Symbol position: “left”, “right” |
satcomma | satcomma | boolean | No | Yes | Whether to use satcomma formatting |
size | size | string | No | Yes | Money size: “small”, “default”, “large”, “xlarge” |
showEstimate | show-estimate | boolean | No | Yes | Whether to show estimate text |
textSize | text-size | string | No | Yes | Text size: “base”, “lg”, “xl”, “2xl”, “3xl”, “4xl”, “5xl”, “6xl”, “7xl”, “8xl”, “9xl” |
Valid Values
Section titled “Valid Values”Bitcoin Formats
Section titled “Bitcoin Formats”sats- Display in satoshisBTC- Display in Bitcoin (decimal format)bip177- Display using BIP177 format
Symbol Positions
Section titled “Symbol Positions”left- Symbol appears before the amountright- Symbol appears after the amount
Money Sizes
Section titled “Money Sizes”small- Small money displaydefault- Standard money displaylarge- Large money displayxlarge- Extra large money display
Text Sizes
Section titled “Text Sizes”base- Base text sizelg- Large textxl- Extra large text2xl- 2x large text3xl- 3x large text4xl- 4x large text5xl- 5x large text6xl- 6x large text7xl- 7x large text8xl- 8x large text9xl- 9x large text
Behavior
Section titled “Behavior”- Amount Conversion: The component automatically converts between satoshis and Bitcoin based on the format
- Truncation: When
truncatedis true, large numbers are shortened (e.g., 1,000,000 → 1M) - Satcomma Formatting: When
satcommais true, uses satcomma notation for better readability - Symbol Positioning: Controls whether the Bitcoin symbol appears before or after the amount
- Size Responsiveness: The
sizeproperty controls the overall visual size of the money display - Text Scaling: The
textSizeproperty allows fine-grained control over text size
Events
Section titled “Events”The bitcoin value component does not emit custom events. It behaves as a standard HTML element for displaying Bitcoin amounts.