<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSLevelIndicator",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSLevelIndicator"
  },
  "title" : "NSLevelIndicator"
}
-->

# NSLevelIndicator

A visual representation of a level or quantity, using discrete values.

```
class NSLevelIndicator
```

## Overview

A level indicator is similar to an [`NSSlider`](/documentation/AppKit/NSSlider) object, but provides a more customized visual feedback to the user. Unlike sliders, level indicators do not have a “knob” indicating the current setting, and they do not allow the user to adjust the current setting. You set the value of the level indicator programmatically. The supported indicator styles include:

- A capacity style level indicator. The continuous mode for this style is often used to indicate conditions such as how much data is on hard disk. The discrete mode is similar to audio level indicators in audio playback applications. You can specify both a warning value and a critical value that provides additional visual feedback to the user.
- A ranking style level indicator. This is similar to the star ranking displays provided in iTunes and iPhoto. You can also specify your own ranking image.
- A relevancy style level indicator. This style is used to display the relevancy of a search result, for example in Mail.

`NSLevelIndicator` uses an [`NSLevelIndicatorCell`](/documentation/AppKit/NSLevelIndicatorCell) to implement much of the control’s functionality. `NSLevelIndicator` provides cover methods for most of the [`NSLevelIndicatorCell`](/documentation/AppKit/NSLevelIndicatorCell) methods, which call the corresponding cell method.

## Topics

### Configuring the Cell

[`NSLevelIndicatorCell`](/documentation/AppKit/NSLevelIndicatorCell)

`NSLevelIndicatorCell` is a subclass of [`NSActionCell`](/documentation/AppKit/NSActionCell) that provides several level indicator display styles including: capacity, ranking and relevancy. The capacity style provides both continuous and discrete modes.

### Configuring the Range of Values

[`minValue`](/documentation/AppKit/NSLevelIndicator/minValue)

The receiver’s minimum value.

[`maxValue`](/documentation/AppKit/NSLevelIndicator/maxValue)

The receiver’s maximum value.

[`warningValue`](/documentation/AppKit/NSLevelIndicator/warningValue)

The receiver’s warning value.

[`criticalValue`](/documentation/AppKit/NSLevelIndicator/criticalValue)

The receiver’s critical value.

### Managing Tick Marks and Style

[`tickMarkPosition`](/documentation/AppKit/NSLevelIndicator/tickMarkPosition)

Determines how the receiver’s tick marks are aligned with it.

[`numberOfTickMarks`](/documentation/AppKit/NSLevelIndicator/numberOfTickMarks)

The number of tick marks associated with the receiver.

[`numberOfMajorTickMarks`](/documentation/AppKit/NSLevelIndicator/numberOfMajorTickMarks)

The number of major tick marks associated with the receiver.

[`tickMarkValue(at:)`](/documentation/AppKit/NSLevelIndicator/tickMarkValue(at:))

Returns the receiver’s value represented by the tick mark at the specified index (the minimum-value tick mark has an index of 0).

[`rectOfTickMark(at:)`](/documentation/AppKit/NSLevelIndicator/rectOfTickMark(at:))

Returns the bounding rectangle of the tick mark identified by the specified index (the minimum-value tick mark is at index 0).

[`levelIndicatorStyle`](/documentation/AppKit/NSLevelIndicator/levelIndicatorStyle)

The appearance of the indicator.

[`NSLevelIndicator.Style`](/documentation/AppKit/NSLevelIndicator/Style)

Constants that specify a level indicator’s appearance.

### Configuring the Drawing Attributes

[`ratingImage`](/documentation/AppKit/NSLevelIndicator/ratingImage)

Sets the image used by the rating indicator style in place of the default star image.

[`drawsTieredCapacityLevels`](/documentation/AppKit/NSLevelIndicator/drawsTieredCapacityLevels)

[`fillColor`](/documentation/AppKit/NSLevelIndicator/fillColor)

Sets the fill color used by Continuous and Discrete Capacity indicators when drawing the “normal” state, and by the rating indicator when drawing stars.

[`warningFillColor`](/documentation/AppKit/NSLevelIndicator/warningFillColor)

Sets the fill color used by Continuous and Discrete Capacity indicators when drawing values above the “warning” threshold.

[`criticalFillColor`](/documentation/AppKit/NSLevelIndicator/criticalFillColor)

Sets the fill color used by Continuous and Discrete Capacity indicators when drawing values above the “critical” threshold.

### Managing Placeholder Information

[`ratingPlaceholderImage`](/documentation/AppKit/NSLevelIndicator/ratingPlaceholderImage)

Sets the image used by the rating indicator style in place of the default faded placeholder image.

[`placeholderVisibility`](/documentation/AppKit/NSLevelIndicator/placeholderVisibility-swift.property)

For a rating-style indicator, sets the conditions under which rating placeholders are displayed.

[`NSLevelIndicator.PlaceholderVisibility`](/documentation/AppKit/NSLevelIndicator/PlaceholderVisibility-swift.enum)

### Controlling the Edit Behavior

[`isEditable`](/documentation/AppKit/NSLevelIndicator/isEditable)



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)