Money Value
Example
Section titled “Example”Import
Section titled “Import”import '@sbddesign/bui-ui/money-value.js'import { BuiMoneyValueReact as BuiMoneyValue } from '@sbddesign/bui-ui/react'<bui-money-value amount="100" symbol="$"></bui-money-value><BuiMoneyValue amount="1000" symbol="$"></BuiMoneyValue>Properties
Section titled “Properties”| Property | Attribute | Type | Required | Reflected | Description |
|---|---|---|---|---|---|
symbolPosition | symbol-position | string | No | Yes | Symbol position: “left”, “right” |
symbol | symbol | string | No | Yes | Currency symbol to display |
amount | amount | number | No | Yes | Money amount to display |
truncation | truncation | boolean | No | Yes | Whether to truncate large numbers |
size | size | string | No | Yes | Money size: “small”, “default”, “large”, “xlarge” |
satcomma | satcomma | boolean | No | Yes | Whether to use satcomma formatting |
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”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”- Generic Money Display: This component is designed for displaying any currency, not just Bitcoin
- Symbol Customization: The
symbolproperty allows you to set any currency symbol (e.g., ”$”, ”€”, ”¥”, ”₿”) - Truncation: When
truncationis 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 currency 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 - Estimate Display: The
showEstimateproperty can display additional context text
Events
Section titled “Events”The money value component does not emit custom events. It behaves as a standard HTML element for displaying monetary amounts.