name thatuiuser interface
Volume
Key Repeat

Drag the knobs — the lower slider snaps to its tick marks (allowsTickMarkValuesOnly)

Slider

/ NSSlider · Slider(value:in:step:) /

also called slider control, seek bar, track bar, range control

“The dot you drag along a line” is a slider — NSSlider. The circle is the knob, the groove is the track, and the leading portion up to the knob is tinted with the accent color. A continuous slider picks any value in the range; give it tick marks (the little lines below) and allowsTickMarkValuesOnly, and the knob snaps between fixed stops — the Key Repeat slider in System Settings is the classic tick-marked one.

Anatomy — every part, named

  1. 1
    Knob (thumb)NSSlider.knobThickness

    “The round dot you drag” is the knob — AppKit calls it the knob; the web calls the same thing a thumb.

  2. 2
    Filled trackSlider + .tint

    “The blue part of the line before the knob” is the filled side of the track — it shows how far along the range the value sits.

  3. 3
    TrackNSSlider.SliderType.linear

    “The groove the dot slides along” is the track — the full range, end to end.

  4. 4
    Tick marksNSSlider.numberOfTickMarks

    “The little lines under the slider” are tick marks — with allowsTickMarkValuesOnly the knob only lands on them.

Prompt — paste into your agent

Use a native macOS slider — NSSlider (SwiftUI: Slider(value:in:step:)): horizontal linear style, round knob, the leading side of the track tinted with the accent color. For discrete values add tick marks below with numberOfTickMarks and tickMarkPosition = .below, and snap the knob to them with allowsTickMarkValuesOnly = true. Set isContinuous = true so the value updates while dragging.

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).

AppKitNSSlider
SwiftUISlider(value:in:step:)
AppKitNSSlider.numberOfTickMarks
AppKitNSSlider.allowsTickMarkValuesOnlysnap to ticks
AppKitNSSlider.tickMarkPosition.below / .above
AppKitNSSlider.isContinuousact while dragging, not just on release

See also

Search

Describe the UI element you're thinking of