Hi! Is there a way to remove/replace the `Ripple`-...
# compose
a
Hi! Is there a way to remove/replace the
Ripple
-indication for Buttons and Cards? Or to override
rememberRipple
in a custom theme?
r
Copy code
fun Modifier.clickCustom(
    color: Color? = null,
    enabled: Boolean = true,
    onClick: () -> Unit = {}
): Modifier = composed {
    clickable(
        enabled = enabled,
        interactionSource = remember { MutableInteractionSource() },
        indication = rememberRipple(color = color ?: colors.primary),
        onClick = onClick,
    )
}
I've added this to rows/columns but I've find a way for Button
a
Yes for custom views this work but i dont see how this could be added to a button?
r
Im stuck with same issue coz of custom theme. For now I've created Custom button using material button code present in compose
button is just a row wrapped inside surface
1
a
Yes, it shouldn’t too much work to just create a custom one but I am creating a complete design system som I’ll need to create a custom button for allt button types…
l
Yes the intended path here is to create your own button - ripples are a fundamental part of Material design. If you are building your own design system, there are probably other things you want to change anyway, so it will end up being easier just to build your own
It also allows you to expose only the types of button you want, with only the parameters you need
👍 2