Skip to content

Instantly share code, notes, and snippets.

@anitaa1990
Created April 8, 2025 06:57
Show Gist options
  • Save anitaa1990/f0120934810287665e18d097f4557e5f to your computer and use it in GitHub Desktop.
Save anitaa1990/f0120934810287665e18d097f4557e5f to your computer and use it in GitHub Desktop.
@Composable
fun SlideToBookButton(
btnText: String, // The text label shown on the button (e.g., "Book Ride ₹199")
btnTextStyle: TextStyle, // The style for the button text (font, weight, size, etc.)
outerBtnBackgroundColor: Color, // Background color for the outer track (entire button)
sliderBtnBackgroundColor: Color, // Background color for the draggable thumb
@DrawableRes sliderBtnIcon: Int, // Icon to show inside the draggable thumb
onBtnSwipe: () -> Unit // Callback triggered when swipe is completed
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment