pub struct MaterialNotification { /* private fields */ }Expand description
Material Design notification component.
Notifications display system-style messages to users with support for titles, subtitles, icons, and close buttons. They follow Material Design 3 specifications.
§Example
use egui_material3::{notification, MaterialNotification};
// Simple notification
ui.add(notification()
.title("New Message")
.text("You have a new message from John Doe"));
// Notification with icon and close button
ui.add(notification()
.title("Download Complete")
.subtitle("Your file is ready")
.icon("download")
.closeable(true));Implementations§
Source§impl MaterialNotification
impl MaterialNotification
Sourcepub fn title_right_text(self, text: impl Into<String>) -> Self
pub fn title_right_text(self, text: impl Into<String>) -> Self
Set the right-aligned title text (e.g., timestamp)
Sourcepub fn auto_dismiss(self, duration: Duration) -> Self
pub fn auto_dismiss(self, duration: Duration) -> Self
Set auto-dismiss duration
Sourcepub fn align(self, align: NotificationAlign) -> Self
pub fn align(self, align: NotificationAlign) -> Self
Set notification alignment
Sourcepub fn with_offset(self, offset: f32) -> MaterialNotificationWithOffset
pub fn with_offset(self, offset: f32) -> MaterialNotificationWithOffset
Show the notification with a vertical offset for stacking. This is useful for displaying multiple notifications.
Trait Implementations§
Source§impl Default for MaterialNotification
impl Default for MaterialNotification
Auto Trait Implementations§
impl Freeze for MaterialNotification
impl RefUnwindSafe for MaterialNotification
impl Send for MaterialNotification
impl Sync for MaterialNotification
impl Unpin for MaterialNotification
impl UnsafeUnpin for MaterialNotification
impl UnwindSafe for MaterialNotification
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more