Data Format
Set consistent display rules for numbers, dates and data states. Preview your choices, then copy the guidance or download the configuration.
Numbers and currency
Format quantities consistently for the selected locale. Keep identifiers, phone numbers and postal codes as text to preserve leading zeros.
Dates and times
Keep calendar dates separate from timestamps. Date-only values retain their calendar day; timestamps are displayed in the selected time zone.
Missing and sensitive data
Use distinct states for zero, absent values, pending requests and errors. Masking is presentation only: remove sensitive data before delivering it to the browser.
Data Format - Markdown export
This page's own content, as Markdown - copy it straight into your design system docs or hand it to an AI/agent workflow.
Implementation contract
Saved validated choices override project recommendations, which override system defaults. This implementation contract governs static specimens. Resolved tokens in the current export are authoritative values. Component exceptions must name the affected role and reason.
Flow
Configure a field, inspect its formatted example, copy/export current valid settings and reset/reload. Every valid input updates without blur. Invalid simultaneous fields all expose errors and retain the prior valid configuration.
Constraints
Decimal precision 0–6, trailing reveal 0–8, one Unicode code point for the mask, a supported locale and valid IANA zone. Explicit comma grouping cannot conflict with a comma decimal locale. Distinguish real zero, missing, invalid and loading. Never reveal the entire value through a tooltip or accessible name.
Layout and accessibility
Group number/currency, date/time and missing/sensitive settings with separators. Equal field heights and gutters, wrapped labels and responsive columns share the reference layout. Loading is announced once. Export the typed configuration and locale/zone/range/redaction rules.
Value identity
Apply numeric formatting to quantities, not IDs, phone numbers, postal codes or tracking references. Preserve leading zeros. Numeric table alignment applies only to numeric kinds. Date-only values retain their calendar day regardless of time zone. Ranges require two valid ordered dates; partial redaction counts Unicode code points and always masks at least one.
Localized display
Locale controls grouping patterns, currency placement, percent spacing and relative wording. Unit symbols preserve case; SI quantities use a space before the unit. Decimal precision fixes currency fractions and limits other numeric fractions. Display strings are not interchange timestamps. Exports include current valid configuration and specific guidance, not unselected editor options.
Machine contract: section rules, storage, units and acceptance
{
"schemaVersion": 1,
"authority": "Saved validated choices override project recommendations, which override system defaults. This implementation contract governs static specimens. Resolved tokens in the current export are authoritative values. Component exceptions must name the affected role and reason.",
"governance": {
"owners": "Design System Lead owns token and compatibility policy. Designers own specimens and interaction contracts. Developers own resolver/export/import parity. QA and Accessibility own release evidence. Product teams own domain-specific confidence, privacy and retention policies.",
"changes": "Change the JSON contract first, regenerate documentation/defaults/catalog/tokens, then run model, DOM and recipient checks. Link the changed finding IDs and evidence in the release review.",
"compatibility": "Keep hue-named CSS tokens as compatibility aliases while semantic consumers migrate. Additive tokens retain schemaVersion 1. A removed/renamed key or changed stored meaning requires a schema migration, a version bump and a documented replacement before release. Keep the prior reader fixture until the migration is verified.",
"deprecation": "Record old key, replacement, reason, introduced version, planned removal version and affected consumers. Do not remove a token while an active consumer still uses it. Future records are preserved rather than coerced.",
"scope": "This is a web design system with one shared workspace profile. Native dp/sp adaptation and real agent execution require separate adapters and acceptance. User-defined colors and responsive exceptions require product-specific rendered verification."
},
"storage": {
"version": 1,
"legacy": "Unversioned valid records migrate in memory. Typography headingScaleVersion 2 applies the smaller six-heading scale once to older records, retaining other roles and existing font/color/style metrics. Later custom size edits are retained. Unsupported future records are preserved. The next successful write stamps the migrated version.",
"future": "Reject unsupported future versions. Preserve raw data. Offer backup and explicit reset.",
"invalid": "Foundation selections preview locally until Save foundation succeeds. Saved Foundation editors require Edit foundation before changes. Cancel discards the preview. Invalid drafts never replace saved records; storage failures retain the editable preview and the last durable record.",
"concurrency": "A storage event refreshes applied tokens and disables stale editor controls until reload. Never merge simultaneous edits silently."
},
"units": {
"base": "1rem = 16px at default browser settings. Do not fix the root font size.",
"use": "Prefer rem for typography, spacing and control dimensions. Hairline borders and viewport thresholds may use px. Both equivalents appear in Markdown. SVG strokes use viewBox units. Ratios, percentages, columns, timing and weights are unitless or retain their own units.",
"native": "Web CSS px/rem are not native dp/sp. A native adapter must map semantic roles, support text scaling and test device density. Native rendering is not shipped by this web library."
},
"acceptance": [
"Compare page, applied tokens, durable record, Machine View and exported instructions.",
"Test valid, unfinished, invalid, missing, malformed, legacy and future records. Exercise storage failure, reset, reload and another tab.",
"Test 320, 375, 768, 1024 and 1440px widths, 200% zoom, text-spacing overrides, RTL and long/localized labels.",
"Use keyboard and screen reader. Confirm focus return, names, values, error associations and status announcements.",
"Verify actual rendered text/surface pairs, forced colors, reduced motion, print and exported recipes in a recipient fixture. Source or DOM checks alone are not rendered acceptance."
],
"layers": {
"content": 0,
"sticky": 20,
"popover": 40,
"scrim": 60,
"dialog": 70,
"toast": 80,
"tooltip": 90,
"rules": "Each overlay gets an explicit owner and close/focus-return path. Portal menus out of clipped scroll containers. Nested dialogs stack one scrim per modal owner. Escape closes the top dismissible layer. Tooltips never block actions. Test collision and zoom; do not infer stacking order from shadow size."
},
"section": {
"title": "Data Format",
"rules": {
"Flow": "Configure a field, inspect its formatted example, copy/export current valid settings and reset/reload. Every valid input updates without blur. Invalid simultaneous fields all expose errors and retain the prior valid configuration.",
"Constraints": "Decimal precision 0\u20136, trailing reveal 0\u20138, one Unicode code point for the mask, a supported locale and valid IANA zone. Explicit comma grouping cannot conflict with a comma decimal locale. Distinguish real zero, missing, invalid and loading. Never reveal the entire value through a tooltip or accessible name.",
"Layout and accessibility": "Group number/currency, date/time and missing/sensitive settings with separators. Equal field heights and gutters, wrapped labels and responsive columns share the reference layout. Loading is announced once. Export the typed configuration and locale/zone/range/redaction rules.",
"Value identity": "Apply numeric formatting to quantities, not IDs, phone numbers, postal codes or tracking references. Preserve leading zeros. Numeric table alignment applies only to numeric kinds. Date-only values retain their calendar day regardless of time zone. Ranges require two valid ordered dates; partial redaction counts Unicode code points and always masks at least one.",
"Localized display": "Locale controls grouping patterns, currency placement, percent spacing and relative wording. Unit symbols preserve case; SI quantities use a space before the unit. Decimal precision fixes currency fractions and limits other numeric fractions. Display strings are not interchange timestamps. Exports include current valid configuration and specific guidance, not unselected editor options."
}
}
}