pub trait ButtonRippleExt {
// Required method
fn ripple(self) -> RippleButton;
}Available on crate feature
material-design only.Expand description
Extension trait that adds ripple effect support to Button.
This trait provides the ButtonRippleExt::ripple method that wraps the button’s children in a Ripple component, creating a Material Design-style ripple effect on click.
§Example
fn app() -> impl IntoElement {
Button::new()
.on_press(|_| println!("Pressed!"))
.ripple()
.color((200, 200, 255))
.child("Click me!")
.child("More text")
}Required Methods§
Sourcefn ripple(self) -> RippleButton
fn ripple(self) -> RippleButton
Enable ripple effect on this button. Returns a RippleButton that allows adding children and configuring the ripple.