Alert Dialog

Rust/UI component that displays a modal dialog that interrupts the user with important content and expects a response.

dialog
  • Rust/UI Icons - CopyCopy Demo

Are you absolutely sure?

This action cannot be undone. This will permanently delete your account and remove your data from our servers.

use leptos::prelude::*;

use crate::components::_coming_soon::alert_dialog::{
    AlertDialog, AlertDialogBody, AlertDialogClose, AlertDialogContent, AlertDialogDescription, AlertDialogFooter,
    AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger,
};
use crate::components::ui::button::Button;

#[component]
pub fn DemoAlertDialog() -> impl IntoView {
    view! {
        <AlertDialog>
            <AlertDialogTrigger>Open Alert</AlertDialogTrigger>

            <AlertDialogContent class="w-[425px]">
                <AlertDialogBody>
                    <AlertDialogHeader>
                        <AlertDialogTitle>"Are you absolutely sure?"</AlertDialogTitle>

                        <AlertDialogDescription>
                            "This action cannot be undone. This will permanently delete your account and remove your data from our servers."
                        </AlertDialogDescription>
                    </AlertDialogHeader>

                    <AlertDialogFooter>
                        <AlertDialogClose>"Cancel"</AlertDialogClose>
                        <Button attr:r#type="submit">"Continue"</Button>
                    </AlertDialogFooter>
                </AlertDialogBody>
            </AlertDialogContent>
        </AlertDialog>
    }
}

Installation

# Coming soon :)

Usage

// Coming soon 🦀