Toast
Lightweight notifications and transient feedback
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)
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:
import { dismissToast, clearToasts } from '@talex-touch/tuffex/utils'
Was this helpful?