Skip to content
TEXT AND NUMBERS · FREE

MoneyField

Type amounts the way your users write them, in their own culture.

Amounts are written differently around the world. MoneyField formats and parses decimal values with the current culture, accepting both 1,234.50 and 1.234,50 styles where the culture expects them.

Why it helps

  • Culture-aware amounts
  • Decimal precision for money
  • Works with EditForm

Where it fits

  • Invoices and orders
  • Budgets
  • Price lists
MoneyField control in a RayCraft page

Example

<MoneyField @bind-Value="_price" Label="Price" Currency="EUR" />
<MoneyField @bind-Value="_budget" Label="Budget" Currency="USD" Decimals="0" Min="0" Max="1000000" />
<span>Stored values: @(_price?.ToString("0.00###") ?? "none"), @(_budget?.ToString("0.###") ?? "none")</span>

@code {
    private decimal? _price = 1234.5m;
    private decimal? _budget = 25000m;
}

A short fragment. Add @using RayCraft.Blazor.Components to your page and use an interactive render mode.

Included in RayCraft Free. Working examples are in the GitHub repository (MIT); it holds example and demo code, not the library code.

All controls ยท Documentation