Skip to main content

Crate leptos_notification

Crate leptos_notification 

Source
Expand description

§Leptos Notification

A beautiful notification system for Leptos applications with animated toasts.

§Features

  • Four notification types: Info, Success, Warning, Error
  • Smooth enter and exit animations
  • Progress bar showing remaining time
  • Easy to use API

§Quick Start

use leptos_notification::{ToastContainer, show_info, show_success, show_warning, show_error};
use leptos::prelude::*;

#[component]
fn App() -> impl IntoView {
    view! {
        <div>
            <button on:click=move |_| show_info("This is an info notification")>
                "Show Info"
            </button>
             
            <ToastContainer />
        </div>
    }
}

Structs§

DefaultIcons
默认图标配置
DefaultStyles
默认样式配置
Notification

Enums§

NotificationType

Functions§

ToastContainer
add_notification
add_notification_custom
set_default_icons
设置默认图标配置
set_default_styles
设置默认样式配置
set_defaults
同时设置默认图标和样式
show_error
show_info
show_success
show_warning