Skip to main content

Module toast

Module toast 

Source
Expand description

Toast widget for transient notifications. Toast widget for displaying transient notifications.

A toast is a non-blocking notification that appears temporarily and can be dismissed automatically or manually. Toasts support:

  • Multiple positions (corners and center top/bottom)
  • Automatic dismissal with configurable duration
  • Icons for different message types (success, error, warning, info)
  • Semantic styling that integrates with the theme system

§Example

let toast = Toast::new("File saved successfully")
    .icon(ToastIcon::Success)
    .position(ToastPosition::TopRight)
    .duration(Duration::from_secs(3));

Structs§

Toast
A toast notification widget.
ToastAction
An interactive action button displayed in a toast.
ToastAnimationConfig
Animation configuration for a toast.
ToastAnimationState
Tracks the animation state for a toast.
ToastConfig
Configuration for a toast notification.
ToastContent
Content of a toast notification.
ToastId
Unique identifier for a toast notification.
ToastState
Internal state tracking for a toast.

Enums§

KeyEvent
Simplified key event for toast interaction handling.
ToastAnimationPhase
Animation phase for toast lifecycle.
ToastEasing
Easing function for animations.
ToastEntranceAnimation
Entrance animation type.
ToastEvent
Result of handling a toast interaction event.
ToastExitAnimation
Exit animation type.
ToastIcon
Icon displayed in the toast to indicate message type.
ToastPosition
Position where the toast should be displayed.
ToastStyle
Visual style variant for the toast.