Prometheus Design System v0.2.0 — WIP

StateMultiSelect

Colored pill multi-select for state/health filtering.

Description

Colored pill multi-select for state/health filtering. Renders health states as colored pills in the input. Used inside FilterToolbar but can be used standalone.

✓ Do
  • Filtering by health/operational state
  • Multi-select where options have color coding
  • Part of FilterToolbar composition
✗ Don’t
  • Generic multi-select without color coding (use Mantine MultiSelect)
  • Single-select state filter
  • Plain Mantine MultiSelect for health states (no colored pills)

Design

StateMultiSelect (selected states)
firing pending ×
Where this component exists in the Prometheus UI
View in Prometheus UI → /alerts StateMultiSelect on the Alerts page — health state filter dropdown

StateMultiSelect on the Alerts page — health state filter dropdown

View in Prometheus UI → /targets StateMultiSelect on the Targets page — up/down state filter

StateMultiSelect on the Targets page — up/down state filter

Implementation

From components/StateMultiSelect.tsx in the Prometheus codebase:

<Combobox store={combobox} onOptionSubmit={handleValueSelect}>
  <Combobox.DropdownTarget>
    <PillsInput pointer onClick={() => combobox.toggleDropdown()} miw={200}
      leftSection={<IconHeartRateMonitor style={inputIconStyle} />}>
      <Pill.Group>
        {renderedValues.length > 0 ? renderedValues : (
          <PillsInput.Field placeholder={placeholder} mt={1} />
        )}
      </Pill.Group>
    </PillsInput>
  </Combobox.DropdownTarget>
  <Combobox.Dropdown>
    <Combobox.Options>
      {options.map((value) => (
        <Combobox.Option value={value} key={value} active={values.includes(value)}>
          <Group gap="sm">
            {values.includes(value) ? <CheckIcon size={12} /> : null}
            <StatePill value={value} className={optionClass(value)} />
          </Group>
        </Combobox.Option>
      ))}
    </Combobox.Options>
  </Combobox.Dropdown>
</Combobox>

Layout Specs

PropertyValue
Input Height32px
Input Min Width180px
Border Radius4px (default)
Border Width1px
Font Size13px
Dropdown Shadowmd (--mantine-shadow-md)

Accessibility