Skip to content

Formatter options

type

Indicates the type of grouping. Possible values are:

  • "conjunction" (default) - For "and"-based grouping of the list items: "A, B, and C"
  • "disjunction" - For "or"-based grouping of the list items: "A, B, or C"
  • "unit" - For grouping the list items as a compound unit (neither "and"-based nor "or"-based): "A, B, C"

WARNING

This option cannot be used together with delimiter

Examples:

style

The grouping style determines how list separators and conjunctions are formatted. Possible values:

  • "long" (default) - Standard list format, e.g., "A, B, and C".
  • "short" - Abbreviated format, e.g., "A, B, & C".
  • "narrow" - Minimal format, e.g., "A, B, C".

WARNING

This option is incompatible with delimiter.

Examples:

delimiter

Defines a custom delimiter for the list. Accepts any Localizable value.

WARNING

This option is incompatible with both type and style.

NOTE

This option is not part of Intl.ListFormat API.

Examples:


"Attributions and copyright licensing" by Mozilla Contributors, licensed under CC-BY-SA 4.0.