Taiga UI 5.0 is out!

FormatNumber CORE

Examples API GitHub

Pipe to format number values to separate thousands

Number formatting can be customized by using TUI_NUMBER_FORMAT

Basic

Formatted number by default: 10 500.33

Formatted number with custom params: 10 500.3300

Formatted number with rounding: 10 500.34

    
      
    
    
      <p>Formatted number by default: {{ 10500.33 | tuiFormatNumber }}</p>

<p>
    Formatted number with custom params:
    {{ 10500.33 | tuiFormatNumber: {precision: 4, decimalSeparator: '.'} }}
</p>

<p>
    Formatted number with rounding:
    {{ 10500.334 | tuiFormatNumber: {precision: 2, decimalSeparator: '.', rounding: 'ceil'} }}
</p>