Currency
Displays a numeric amount with its currency code, locale-specific grouping, and standard currency fraction digits. Use locale="de-CH" for Swiss formatting such as CHF 1’275.50. Keep the underlying amount numeric and use Text for surrounding typography.
| Parameter | Description |
|---|---|
| value | Finite numeric amount or an expression resolving to a number. |
| currency | Three-letter uppercase currency code, such as CHF, EUR, or USD. |
| locale | BCP 47 locale identifier, such as de-CH. Defaults to the viewer's locale. |
| if | Conditional rendering expression. |
Example
xml<Text color="secondary"><Currency value="$item.price" currency="CHF" locale="de-CH" /></Text>
Cli
longlink docs ui --component Currency