## NumberFormatter Use the NumberFormatter component to format number with thousands/decimal separators and suffix/prefix Category: Data Display ### Simple Example Use `NumberFormatter` to format numbers. It supports the same formatting related props as `NumberInput` component. ```python import dash_mantine_components as dmc component = dmc.NumberFormatter(prefix="$ ", value=1000000, thousandSeparator=True) ``` ### Prefix and suffix Set `prefix` and `suffix` props to add given string to the start or end of the value: ```python from dash import html import dash_mantine_components as dmc component = html.Div([ html.Div(["With prefix: ", dmc.NumberFormatter(value=100, prefix="$")]), html.Div(["With suffix: ", dmc.NumberFormatter(value=100, suffix=" RUB")]), ]) ``` ### Keyword Arguments #### NumberFormatter - id (string; optional): Unique ID to identify this component in Dash callbacks. - allowNegative (boolean; optional): Determines whether negative values are allowed, `True` by default. - aria-* (string; optional): Wild card aria attributes. - data-* (string; optional): Wild card data attributes. - decimalScale (number; optional): Limits the number of digits that are displayed after the decimal point, by default there is no limit. - decimalSeparator (string; optional): Character used as a decimal separator, `'.'` by default. - fixedDecimalScale (boolean; optional): If set, 0s are added after `decimalSeparator` to match given `decimalScale`. `False` by default. - loading_state (dict; optional): Object that holds the loading state object coming from dash-renderer. For use with dash<3. `loading_state` is a dict with keys: - prefix (string; optional): Prefix added before the value. - suffix (string; optional): Suffix added after the value. - tabIndex (number; optional): tab-index. - thousandSeparator (string | boolean; optional): A character used to separate thousands, `','` by default. - thousandsGroupStyle (a value equal to: 'none', 'thousand', 'lakh', 'wan'; optional): Defines the thousand grouping style. - value (string | number; optional): Value to format.