<!--
{
  "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/SliderTick",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI10SliderTickV"
  },
  "title" : "SliderTick"
}
-->

# SliderTick

A representation of a tick in a slider, with associated value and
optional label.

```
struct SliderTick<V> where V : BinaryFloatingPoint
```

## Overview

The following example shows a slider bound to the value `percentage`. As the
slider updates the `currentValueLabel`. The slider also renders marks at a
`0.25` step interval.

```
@State private var percentage = 0.5

Slider(value: $percentage) {
    Text("Percentage")
} currentValueLabel: {
    Text("\(percentage)%")
} ticks: {
    SliderTickContentForEach(
        stride(from: 0.0, through: 1.0, by: 0.25).map { $0 },
        id: \.self
    ) { value in
        SliderTick(value) {
            label(for: value)
        }
    }
}
```

## Topics

### Structures

[`struct ID`](/documentation/SwiftUI/SliderTick/ID-swift.struct)

The identity of a tick.

### Initializers

[`init(V)`](/documentation/SwiftUI/SliderTick/init(_:))

Create a labeled slider tick at a specific value.

[`init(_:_:)`](/documentation/SwiftUI/SliderTick/init(_:_:))

Create a slider tick with a label from a localized string key.

[`init(V, label: () -> some View)`](/documentation/SwiftUI/SliderTick/init(_:label:))

Create a labeled slider tick at a specific value.

### Instance Properties

[`var id: SliderTick<V>.ID`](/documentation/SwiftUI/SliderTick/id-swift.property)

The identity of a tick, which is derived from its value.

## Relationships

### Conforms To

[`SliderTickContent`](/documentation/SwiftUI/SliderTickContent)

[`Identifiable`](/documentation/Swift/Identifiable)

[`Equatable`](/documentation/Swift/Equatable)

[`Comparable`](/documentation/Swift/Comparable)

---

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)