Since 1.0.0BETA

Toast

Lightweight notifications and transient feedback

This page was migrated by AI, please review carefully

Migration is complete, but please validate against source code and manual review.

Toast

Lightweight notifications (similar to shadcn/sonner). Mount a single <TxToastHost /> at the app root, then call toast() anywhere.

Basic Usage

Toast

Mount host once, then trigger toasts.

Demo loads on client.

API

toast(options)

EXAMPLE.TS
toast({
  title?: string
  description?: string
  variant?: 'default' | 'success' | 'warning' | 'danger'
  duration?: number // ms, 0 = no auto dismiss
})

dismissToast / clearToasts

Import from @talex-touch/tuffex/utils:

EXAMPLE.TS
import { dismissToast, clearToasts } from '@talex-touch/tuffex/utils'
Was this helpful?