Glass Button
pub fn glass_button(
args: impl Into<GlassButtonArgs>,
ripple_state: RippleState,
child: impl FnOnce(),
)The glass_button component is a glass-style button built on top of the fluid_glass component. It is typically used to trigger an action and can be considered the glass variant of the button component. It supports configuring background color, border, refraction, dispersion, etc., and provides click interactions, ripple animations, and other advanced effects.
Arguments
args: impl Into<GlassButtonArgs>This argument configures the style and behavior of the
glass_buttoncomponent, including background color, border, refraction, dispersion, and other properties. UseGlassButtonArgsBuilderto construct it.ripple_state: RippleStateThe state for the click ripple animation. You must provide a valid
RippleStateinstance to enable the ripple effect.RippleStateis a clonable struct that encapsulates a shared reference to the state internally.child: impl FnOnce()The child component of
glass_button, can be any#[tessera]function.
Preview
