<!--
{
  "availability" : [
    "macOS: 10.12.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSSlider/init(value:minValue:maxValue:target:action:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSSlider(cm)sliderWithValue:minValue:maxValue:target:action:"
  },
  "title" : "init(value:minValue:maxValue:target:action:)"
}
-->

# init(value:minValue:maxValue:target:action:)

Creates a continuous horizontal slider that represents values over the specified range.

```
convenience init(value: Double, minValue: Double, maxValue: Double, target: Any?, action: Selector?)
```

## Parameters

`value`

The initial value displayed by the control.

`minValue`

The minimum value that the control can represent.

`maxValue`

The maximum value that the control can represent.

`target`

The target object that receives action messages from the control.

`action`

The action message sent by the control.

## Return Value

An initialized slider control.

## Discussion

---

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)