Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Examples? #68

Open
gtokman opened this issue May 5, 2023 · 2 comments
Open

Examples? #68

gtokman opened this issue May 5, 2023 · 2 comments

Comments

@gtokman
Copy link

gtokman commented May 5, 2023

Is there an example repo with the different sliders?

I'm interested in recreating this slider specifically:
CleanShot 2023-05-04 at 23 45 50@2x

@coder-free
Copy link

I found examples in view's preview.

@mallman
Copy link

mallman commented Jun 3, 2024

Look at the previews in RangeSlider.swift. For example,

RangeSlider(range: $range6, in: 1.0 ... 3.0)
.cornerRadius(8)
.frame(height: 128)
.rangeSliderStyle(
HorizontalRangeSliderStyle(
track:
HorizontalRangeTrack(
view: LinearGradient(gradient: Gradient(colors: [.blue, .red]), startPoint: .leading, endPoint: .trailing),
mask: RoundedRectangle(cornerRadius: 10)
)
.background(Color.secondary.opacity(0.25)),
lowerThumbSize: CGSize(width: 8, height: 64),
upperThumbSize: CGSize(width: 8, height: 64)
)
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants