Trait SideBarItemRippleExt
pub trait SideBarItemRippleExt {
// Required method
fn ripple(self) -> RippleSideBarItem;
}Available on crate feature
material-design only.Expand description
Extension trait that adds ripple effect support to SideBarItem.
This trait provides the SideBarItemRippleExt::ripple method that wraps the item’s children in a Ripple component, creating a Material Design-style ripple effect on click.
§Example
fn app() -> impl IntoElement {
SideBarItem::new()
.on_press(|_| println!("Pressed"))
.ripple()
.child("Settings")
}Required Methods§
fn ripple(self) -> RippleSideBarItem
fn ripple(self) -> RippleSideBarItem
Enable ripple effect on this sidebar item. Returns a RippleSideBarItem that allows adding children and configuring the ripple.