# `PhoenixKitBilling.Web.Components.CurrencyDisplay`
[🔗](https://github.com/BeamLabEU/phoenix_kit_billing/blob/0.5.1/lib/phoenix_kit_billing/web/components/currency_display.ex#L1)

Provides currency formatting components for the billing system.

Supports formatting monetary amounts with currency symbols,
locale-aware number formatting, and various display styles.

# `currency_amount`

Formats and displays a monetary amount with currency symbol.

## Attributes
- `amount` - Decimal or number to display (required)
- `currency` - Currency code like "EUR", "USD" (default: "EUR")
- `symbol_position` - :before or :after (default: :before)
- `show_code` - Show currency code alongside symbol (default: false)
- `class` - Additional CSS classes

## Examples

    <.currency_amount amount={99.99} />
    <.currency_amount amount={@order.total} currency="USD" />
    <.currency_amount amount={150.00} currency="EUR" show_code={true} />

## Attributes

* `amount` (`:any`) (required)
* `currency` (`:string`) - Defaults to `"EUR"`.
* `symbol_position` (`:atom`) - Defaults to `:before`. Must be one of `:before`, or `:after`.
* `show_code` (`:boolean`) - Defaults to `false`.
* `class` (`:string`) - Defaults to `""`.

# `currency_badge`

Displays a currency badge with symbol and name.

## Attributes
- `code` - Currency code like "EUR", "USD" (required)
- `name` - Currency name (optional, will be looked up if not provided)
- `size` - Badge size: :xs, :sm, :md, :lg (default: :sm)
- `class` - Additional CSS classes

## Examples

    <.currency_badge code="EUR" />
    <.currency_badge code="USD" name="US Dollar" size={:md} />

## Attributes

* `code` (`:string`) (required)
* `name` (`:string`) - Defaults to `nil`.
* `size` (`:atom`) - Defaults to `:sm`. Must be one of `:xs`, `:sm`, `:md`, or `:lg`.
* `class` (`:string`) - Defaults to `""`.

# `currency_colored`

Displays currency with styling for positive/negative amounts.

## Attributes
- `amount` - Decimal or number to display (required)
- `currency` - Currency code (default: "EUR")
- `class` - Additional CSS classes

## Examples

    <.currency_colored amount={100.00} />
    <.currency_colored amount={-50.00} currency="USD" />

## Attributes

* `amount` (`:any`) (required)
* `currency` (`:string`) - Defaults to `"EUR"`.
* `class` (`:string`) - Defaults to `""`.

# `currency_compact`

Displays a compact currency amount, useful for tables and lists.

## Attributes
- `amount` - Decimal or number to display (required)
- `currency` - Currency code (default: "EUR")
- `class` - Additional CSS classes

## Examples

    <.currency_compact amount={99.99} />
    <.currency_compact amount={@invoice.total} currency="USD" />

## Attributes

* `amount` (`:any`) (required)
* `currency` (`:string`) - Defaults to `"EUR"`.
* `class` (`:string`) - Defaults to `""`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
