Skip to content

Toast

uitemplate

Enable screen reader announcements (default: true)

Installation

$ bunx termuijs add toast

Copies the source into src/components/toast/ and installs @termuijs/core, @termuijs/widgets.

Usage

ts
import { Toast } from '@termuijs/ui'
ts
new Toast(options: ToastOptions = {})

API Reference

Toast

PropTypeRequiredDescription
position'top-right' | 'bottom-right' | 'top-left' | 'bottom-left'optional
durationMsnumberoptional
maxVisiblenumberoptional
announcebooleanoptionalEnable screen reader announcements (default: true)
#template#toast