Notification

A notification component to display messages to the user.

Installation

layout.tsx
import { Toaster } from '@aqqo/aqqo-ui'

export default function Layout({ children }: { children: React.ReactNode }) {
    return (
        <html>
            <body>
                {children}
                <Toaster />
            </body>
        </html>
    )
}

Usage

import { Button, notify } from "@aqqo/aqqo-ui";
<Button
    onClick={() => notify.success("This is a success notification")}
>
    Click me
</Button>

Examples

Warning

Error

Props

Notification props
PropTypeValuesDescription
variantstringsuccess | warning | errorDetermines the variant of the notification
optionsany-Additional options for the notification

See the Sonner documentation for more information on the available options: Sonner.