ListFormat Styles: Long, Short, and Narrow
What you'll learn: How to control the verbosity of list formatting by choosing the appropriate style option.
Understanding Formatting Styles
When using Intl.ListFormat to format lists in natural language, you can control how verbose or compact the output appears using the style option. Think of it like choosing between formal business language, casual conversation, or terse note-taking — the meaning stays the same, but the presentation differs.
The Three Style Options
long (default)
The most verbose, fully spelled-out format. Use this for formal content, accessibility, or when clarity matters most.
const longList = new Intl.ListFormat('en', { style: 'long' });
console.log(longList.format(['apples', 'oranges', 'bananas']));
// "apples, oranges, and bananas"
short
A moderately compact format. Good for UI elements where space is somewhat limited but readability remains important.
const shortList = new Intl.ListFormat('en', { style: 'short' });
console.log(shortList.format(['apples', 'oranges', 'bananas']));
// "apples, oranges, & bananas" (uses ampersand)
narrow
The most compact format, often using symbols or abbreviations. Best for tight spaces like mobile interfaces or data tables.
const narrowList = new Intl.ListFormat('en', { style: 'narrow' });
console.log(narrowList.format(['apples', 'oranges', 'bananas']));
// "apples, oranges, bananas" (minimal punctuation)
When to Use Each Style
- Long: Reports, articles, accessibility-focused content, formal communication
- Short: Standard UI text, moderate space constraints, tooltips
- Narrow: Mobile interfaces, compact lists, space-critical displays
Note that different locales may show more dramatic differences between styles than English does.
Key Takeaway: The style option ('long', 'short', 'narrow') lets you balance readability against space constraints, with locale-appropriate formatting rules automatically applied.