WarUI

Enum column type

GRID-A07-F08P1baselinePlanned

`type: 'enum'` maps stored codes to human labels, optional colors and icons, rendered as text or badges. The option list also drives the column's filter and editor choices, and sorting can follow the declared option order instead of alphabetical order.

Planned. This page shows the specification from issue #184. The live example, source for every framework and the API reference replace it when the feature ships.

Live example

An issues grid with a status enum column with 5 options, each with a label and color token.

Expected behavior

Badges show labels with theme colors. Sorting follows the workflow order when enabled. An unknown code renders the raw code with an 'unknown' style.

Planned API surface

type'enum'optionsenumDisplaysortByOptionOrderunknownValue

Acceptance criteria

  • options accepts an array of {value,label,color?,icon?} or a Record<value,label>. (pending)
  • Badge text and background colors meet a WCAG AA contrast ratio for all built-in color tokens. (pending)
  • Unknown values never throw, and unknownValue controls their rendering. (pending)
  • sortByOptionOrder places unknown values last. (pending)