kieranb662/Sliders-SwiftUI
소개
독특하고 완전히 사용자 지정할 수 있는 SwiftUI 슬라이더, 조이스틱, 트랙패드 등을 모은 컬렉션입니다.
웹 및 앱 개발측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- +2
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Original
Sliders is a collection of fully stylable, drag-based SwiftUI controls — linear, radial, range, 2-D, and path sliders — designed to fill the gaps the standard toolkit leaves behind. Every control scales to its container, accepts custom styles, and optionally provides tick marks with haptic feedback. You can try them all out quickly by cloning the example project
📖 Full API reference & tutorials are available on the hosted documentation site.
Controls at a Glance
| Control | Description | Docs |
|---|---|---|
| LSlider | A linear slider that works at any angle and scales its track to the available space. | Guide · Tutorial |
| DoubleLSlider | A linear range slider with two thumbs and a draggable active-track segment. | Guide · Tutorial |
| RSlider | A circular slider whose thumb travels around a configurable arc. | Guide · Tutorial |
| DoubleRSlider | A circular range slider with two thumbs and a draggable active-track arc. | Guide · Tutorial |
| TrackPad | A 2-D slider that maps horizontal and vertical drag to two independent values. | Guide · Tutorial |
| RadialPad | A joystick-style 2-D control that retains its position after the drag ends. | Guide · Tutorial |
| Joystick | An on-screen joystick that appears wherever the user drags within a hit-box. | Guide · Tutorial |
| PSlider | Turns any SwiftUI Shape into a slider whose thumb travels along the shape's path. |
Guide · Tutorial |
| OverflowSlider | A meter-style slider with two moving parts — thumb and track — and velocity gestures. | Guide · Tutorial |
Quick Start
import Sliders
struct ContentView: View {
@State private var value = 0.5
var body: some View {
LSlider($value, range: 0...1, keepThumbInTrack: true, trackThickness: 20)
.frame(height: 60)
.padding()
}
}
Every control follows the same styling pattern — conform to a style protocol and apply it with a modifier:
VStack {
LSlider($red, range: 0...1)
LSlider($green, range: 0...1)
LSlider($blue, range: 0...1)
}
.linearSliderStyle(MyLSliderStyle())
Requirements
| Platform | Minimum Version |
|---|---|
| iOS | 26 |
| macOS | 26 |
| watchOS | 26 |
Installation
Add the package via Swift Package Manager:
- In Xcode, go to File → Add Package Dependencies.
- Paste the repository URL:
https://github.com/kieranb662/Sliders-SwiftUI. - Select a minimum version and add the package to your target.
Or add it directly to your Package.swift:
dependencies: [
.package(url: "https://github.com/kieranb662/Sliders-SwiftUI", from: "1.0.0")
]
Documentation
| Resource | Link |
|---|---|
| API Reference | kieranb662.github.io/Sliders-SwiftUI/documentation/sliders |
| Tutorials | kieranb662.github.io/Sliders-SwiftUI/tutorials/sliders |
| Example Project | SlidersExamples |
License
Sliders is available under the MIT license. See the LICENSE file for more info.
관련 프로젝트 살펴보기
불러오는 중…