DevExtreme v24.2 is now available.

Explore our newest features/capabilities and share your thoughts with us.

Your search did not match any results.

React Number Box - Formatting

Use the format property to specify the integer, currency, accounting, percent, and other formats of the NumberBox value.

To give you the ability to edit code on the fly, the demo uses SystemJS. For this reason, launching the demo takes some time. We strongly recommend that you do not use this approach in real projects.
Backend API

The format property can accept the following value types:

  • Predefined format
    See the type property description for a list of accepted values.

  • Custom format string
    Use a LDML pattern to specify a custom format. Refer to the following article for more information: Custom Format String.

  • Function
    A function should apply a custom format to a value and return the formatted value as a string. Functions are useful for advanced formatting.

  • Object
    Full format configuration. The object structure is shown in the format API section.