NV Elements Catalog Starters Repo System Themes About Getting Started Changelog Metrics Support Accessibility Contributions Requests Migration Integrations Installation MCP CLI Lint Angular Bundles Custom Elements Extensions Golang Hugo Import Maps Lit NextJS Nuxt Preact React SolidJS Svelte TypeScript Vue Foundations Typography Iconography Themes Design Tokens Size & Space Objects Interactions Support Status Color Animation Fonts Layers Custom Layout Horizontal Vertical Grid Popovers i18n Visualization View Transitions Elements Accordion Alert Avatar Badge Breadcrumb Button Button Group Card Chat Message Checkbox Color Combobox Copy Button Datagrid Integrations Column Action Column Alignment Column Fixed Column width Container Card Display Settings Footer Heatmap Keynav Multi Select Pagination Panel Detail Panel Grid Performance Placeholder Row Action Row Groups Row Sort Scroll Height Single Select Stripe Date Datetime Dialog Divider Dot Drawer Dropdown Dropdown Group Dropzone File Format Datetime Format Number Format Relative Time Forms Validation Actions Control Icon Icon Button Input Input Group Logo Menu Month Notification Page Page Header Page Loader Pagination Panel Progressive Filter Chip Progress Bar Progress Ring Password Preferences Input Pulse Radio Range Resize Handle Search Select Skeleton Sort Button Sparkline Star Rating Steps Switch Tabs Tag Textarea Time Toast Toggletip Toolbar Tooltip Tree Week Patterns Authentication Browse Chat Dashboard Editor Empty States Heatmap Keyboard Shortcut Logging Media Navigation Onboarding Panel Responsive Search Subheader Trend Code Codeblock Monaco Input Diff Input Editor Diff Editor Problems Markdown Markdown CSS Utility Labs Responsive Layout Viewport Container Patterns Forms API Design Properties & Attributes Slots Registration CustomEvents Stateless Composition Styles Packaging Glossary Logs Internal Guidelines Agent Harness Agent Tooling Agent Ownership Documentation Examples TypeScript Testing Unit Testing Accessibility Testing Lighthouse Testing SSR Testing Visual Testing Troubleshooting Component Creation Internal Examples All Examples

Format Number

beta:  0.2.0 Coverage: unknown Bundle: 10kb Lighthouse: 100 Axe Core Released: 0.0.0
Overview API Examples

<nve-format-number>

Properties

Property Attribute Description Values minimumIntegerDigits minimum-integer-digits

Pad integer output to at least this many digits (1-21).

number
maximumFractionDigits maximum-fraction-digits

Round fraction output to at most this many digits (0-20).

number
minimumFractionDigits minimum-fraction-digits

Pad fraction output to at least this many digits (0-20).

number
useGrouping use-grouping

Grouping separators: 'auto' | 'always' | 'min2' | 'true' | 'false'.

string
signDisplay sign-display

Sign display: 'auto' | 'never' | 'always' | 'exceptZero'.

auto
never
always
exceptZero
compactDisplay compact-display

Compact notation display: 'short' | 'long'. Only applies when notation is compact.

short
long
notation notation

Number notation: 'standard' | 'scientific' | 'engineering' | 'compact'.

standard
scientific
engineering
compact
unitDisplay unit-display

Unit display style: 'short' | 'long' | 'narrow'.

short
long
narrow
unit unit

Unit identifier (such as kilometer or byte). Required when formatStyle is unit.

string
currencyDisplay currency-display

Currency display style: 'symbol' | 'code' | 'name' | 'narrowSymbol'.

symbol
code
name
narrowSymbol
currencySign currency-sign

Currency sign style: 'standard' | 'accounting'.

standard
accounting
currency currency

ISO 4217 currency code (such as USD or EUR). Required when formatStyle is currency.

string
formatStyle format-style

Formatting style: 'decimal' | 'currency' | 'percent' | 'unit'.

decimal
currency
percent
unit
locale locale

Language tag (such as en-US, de-DE). Defaults to document.documentElement.lang or browser default.

string
number number

Optional numeric string for values supplied by JavaScript or bound data. By default, the component formats the element's text content, which also serves as the SSR fallback. When both are present, this property takes precedence.

string

Slots

Slot Description default

Numeric string to format (such as 1234567 or 1234.56). Serves as fallback before hydration.