Definitions
This section covers the foundational concepts for defining and persisting quantity formats in iTwin.js applications. Understanding these definitions is essential before implementing format providers or performing quantity formatting operations.
Overview
Format definitions describe what formats are and how they're structured, independent of their runtime usage. These specifications can be:
- Stored in EC schemas and retrievable through KindOfQuantity, defined as presentation units
- Defined as runtime configuration (via FormatSet) to override EC schema-defined formats
- Defined programmatically (via FormatProps)
When to Read This Section
- Understanding format specifications: Learn how formats are defined and what properties control their behavior
- Configuring format persistence: Set up FormatSets for runtime format storage
- Working with schemas: Understand how KindOfQuantity relates to format definitions
- Defining custom formats: Create FormatProps for specific formatting requirements
Topics
Units
Learn about units of measure, unit families (phenomena), persistence units, and how units are organized and converted. Essential for understanding format specifications.
Formats
Deep dive into FormatProps - the complete specification for how quantity values are displayed. Covers format types (decimal, fractional, scientific), composite formats, station formatting, and format traits. See also the EC schema Format reference for schema-level format definitions, the basis of FormatProps.
Format Sets
Understand format persistence through FormatSets, which map KindOfQuantity names to FormatDefinitions. Learn how FormatSets enable format overrides and unit system configuration.
See Also
- Usage - How to apply these definitions at runtime
- Providers - Implementations that provide format definitions
- EC Format - Schema-level format definitions
- KindOfQuantity - Schema-level quantity type definitions
Last Updated: 23 January, 2026