no-comment / SlideButton

SwiftUI package that provides a customizable slide button that can be swiped to unlock or perform an action
MIT License
24 stars 6 forks source link

Feature request: custom font styling and shadowing option #6

Closed astriddewever closed 5 months ago

astriddewever commented 5 months ago

I would like to express my appreciation for the SlideButton package, which provides a convenient way for me to implement slider buttons in SwiftUI, Thank you!

However, I have two styling feature requests that I believe would enhance the customization options of the SlideButton - which I'm missing as a user:

1. Custom font styling: Currently, the SlideButton package doesn't offer a way to customize the font used for the button's text. It would be incredibly useful to have the ability to specify a custom font, allowing developers to maintain a consistent visual style across their apps. I would like to request the addition of a font styling option that allows users to choose their desired font for the button text.

2. Shadowing Option: While the SlideButton package supports adding shadows to the entire button (by adding the shadow to the whole SlideButton it applies to both the text / the slider icon / the slider completely), there doesn't appear to be a way to apply shadowing specifically to the outermost part of the slider button. It would be beneficial to have the option to add shadowing only to the outer edges of the button, providing a subtle visual effect that enhances its appearance and contributes once again to the consistent design of the app. I would appreciate it if the developers could consider adding this shadowing option to the SlideButton styling.

Thank you for your attention to these suggestions! I believe that these enhancements would further improve the usability and versatility of the SlideButton package. :)

mikakruschel commented 5 months ago

Hey, both suggestions are already possible:

SlideButton(action: {
    print("start action")
    try? await Task.sleep(for: .seconds(2))
}) {
    Text("Test").font(.title.width(.expanded).weight(.black))
}
.background(in: Capsule())
.compositingGroup()
.shadow(color: .pink, radius: 3, x: 10, y: 10)
image
astriddewever commented 5 months ago

Oh I'm sorry! I didn't see it in the documentation on github sorry or the styling example on github.

thank you! 🙂


Van: Miká Kruschel @.> Verzonden: zondag 14 april 2024 15:57 Aan: no-comment/SlideButton @.> CC: Astrid Dewever @.>; Author @.> Onderwerp: Re: [no-comment/SlideButton] Feature request: custom font styling and shadowing option (Issue #6)

Hey, both suggestions are already possible:

SlideButton(action: { print("start action") try? await Task.sleep(for: .seconds(2)) }) { Text("Test").font(.title.width(.expanded).weight(.black)) } .background(in: Capsule()) .compositingGroup() .shadow(color: .pink, radius: 3, x: 10, y: 10)

image.png (view on web)https://github.com/no-comment/SlideButton/assets/20423069/d5b02cb5-2536-4569-94ca-3801081bb7cf

— Reply to this email directly, view it on GitHubhttps://github.com/no-comment/SlideButton/issues/6#issuecomment-2054069860, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AX4UW5R2DNBHHUU7OOQHAVLY5KDLDAVCNFSM6AAAAABGFLBZLWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJUGA3DSOBWGA. You are receiving this because you authored the thread.Message ID: @.***>

[ { @.": "http://schema.org", @.": "EmailMessage", "potentialAction": { @.": "ViewAction", "target": "https://github.com/no-comment/SlideButton/issues/6#issuecomment-2054069860", "url": "https://github.com/no-comment/SlideButton/issues/6#issuecomment-2054069860", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { @.": "Organization", "name": "GitHub", "url": "https://github.com" } } ]