<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "visionOS: 26.0.0 -",
    "watchOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/Slider/init(value:in:neutralValue:enabledBounds:label:currentValueLabel:minimumValueLabel:maximumValueLabel:ticks:onEditingChanged:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI6SliderV5value2in12neutralValue13enabledBounds5label07currentG5Label07minimumgL007maximumgL05ticks16onEditingChangedACyxq_GAA7BindingVyqd__G_SNyqd__Gqd__SgARSgxyXEqd_0_yXEq_yXEq_yXEqd_1_yXEySbctc0G0Qyd_1_Rsd__AA4ViewRd_0_AA0C11TickContentRd_1_SB6StrideRpd__r1_lufc"
  },
  "title" : "init(value:in:neutralValue:enabledBounds:label:currentValueLabel:minimumValueLabel:maximumValueLabel:ticks:onEditingChanged:)"
}
-->

# init(value:in:neutralValue:enabledBounds:label:currentValueLabel:minimumValueLabel:maximumValueLabel:ticks:onEditingChanged:)

Creates a slider to select a value from a given range, which displays
the provided labels and customized ticks.

```
nonisolated init<V>(value: Binding<V>, in bounds: ClosedRange<V> = 0...1, neutralValue: V? = nil, enabledBounds: ClosedRange<V>? = nil, @ContentBuilder label: () -> Label, @ContentBuilder currentValueLabel: () -> some View = { EmptyView() }, @ContentBuilder minimumValueLabel: () -> ValueLabel = { EmptyView() }, @ContentBuilder maximumValueLabel: () -> ValueLabel = { EmptyView() }, @SliderTickBuilder<V> ticks: () -> some SliderTickContent, onEditingChanged: @escaping (Bool) -> Void = { _ in }) where V.Stride : BinaryFloatingPoint
```

## Parameters

`value`

The selected value within `bounds`.

`bounds`

The range values. Defaults to `0...1`.

`neutralValue`

The value’s starting value.

`enabledBounds`

The range of selectable values.

`label`

A `View` that describes the purpose of the instance. Not all
slider styles show the label, but even in those cases, SwiftUI
uses the label for accessibility. For example, VoiceOver uses the
label to identify the purpose of the slider.

`currentValueLabel`

A view that describes `value`.

`minimumValueLabel`

A view that describes `bounds.lowerBound`.

`maximumValueLabel`

A view that describes `bounds.lowerBound`.

`ticks`

The ticks to display along the slider.

`onEditingChanged`

A callback for when editing begins and ends.

## Discussion

The `value` of the created instance is equal to the position of
the given value within `bounds`, mapped into `0...1`.

The slider calls `onEditingChanged` when editing begins and ends. For
example, on iOS, editing begins when the user starts to drag the thumb
along the slider’s track.

---

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)