MantleUI

Toast

A notification system for brief, non-blocking feedback. Use the useToast hook to trigger toasts and render the Toaster component to display them.

Variants

Click the buttons below to trigger toasts of each variant.

Async Actions

Show a loading toast that transitions to success or error after an async operation.

Custom Duration

Control how long each toast stays visible.

Real-World Actions

Common application actions with contextual toast feedback.

useToast API

The useToast() hook returns an object with the following methods:

  • toast.info({ title, description, duration }) — Show an info toast
  • toast.success({ title, description, duration }) — Show a success toast
  • toast.warning({ title, description, duration }) — Show a warning toast
  • toast.error({ title, description, duration }) — Show an error toast
  • dismiss(id) — Dismiss a toast by its ID

Toaster Props

position"bottom-right"
"top-left" | "top-right" | "top-center" | "bottom-left" | "bottom-right" | "bottom-center"

The position where toasts appear on screen.

--mantle-bgtheme default
CSS variable

Override the background color via style. e.g. style={{ "--mantle-bg": "#1a1a2e" }}

--mantle-bordertheme default
CSS variable

Override the border color via style. Set to "transparent" to remove. e.g. style={{ "--mantle-border": "#e94560" }}

--mantle-texttheme default
CSS variable

Override the text color via style. e.g. style={{ "--mantle-text": "#ffffff" }}

--mantle-ringaccent
CSS variable

Override the focus ring color via style. e.g. style={{ "--mantle-ring": "#e94560" }}

© 2026 MantleUI. All rights reserved.