name thatuiuser interface
Rating
Capacity

Stars and capacity bars are one control family: the level indicator

Level Indicator

/ NSLevelIndicator · NSLevelIndicator.Style /

also called level meter, capacity indicator, rating indicator, relevancy indicator

A level indicator shows a value inside a known range rather than the progress of an ongoing task. Its native styles cover continuous or segmented capacity bars, symbol-based ratings such as stars, and compact relevance meters. Warning and critical thresholds can change the capacity indicator's color as the value crosses them.

Anatomy — every part, named

  1. 1
    Filled levelNSLevelIndicator.doubleValue

    “The colored amount inside the little meter” is the filled level.

  2. 2
    Warning thresholdNSLevelIndicator.warningValue

    “The point where the meter changes to a warning color” is the warning threshold.

  3. 3
    Critical thresholdNSLevelIndicator.criticalValue

    “The point where the bar turns critical” is the critical threshold.

  4. 4
    Rating symbolNSLevelIndicator.Style.rating

    “Each star in the rating row” is a rating symbol in the level indicator.

Prompt — paste into your agent

Use an NSLevelIndicator with the style that matches the meaning: .continuousCapacity or .discreteCapacity for a bounded level, .rating for stars, or .relevancy for match strength. Configure warningValue and criticalValue for native threshold coloring; SwiftUI's nearest general equivalent is Gauge.

In code

The exact names this thing goes by in code — each row is one framework’s word for it. Use the row that matches your project (or paste it into your prompt).

AppKitNSLevelIndicator
AppKitNSLevelIndicator.Style
SwiftUIGauge

See also

Search

Describe the UI element you're thinking of