<dy-toast>

A toast component that displays temporary notifications or messages to users. It supports different types of messages (success, warning, error) and can be triggered programmatically.

Example

import { Toast } from 'duoyun-ui/elements/toast';

function onClick() {
  Toast.open('success', 'This is success');
}

API

DuoyunToastElement

Extends TapToastElement

TapToastElement

Shadow DOM; Extends GemElement

TapToastElement Static Properties

Property Type
instance TapToastElement | undefined

TapToastElement Static Methods

Method Type
open { (options: ToastOptions): () => void; (type: Type, content: string | TemplateResult): () => void; }

TapToastElement Instance Properties

Property(Attribute) Reactive Type
items Yes ToastItem[]

TapToastElement Other

Type Value
Part item, icon, body, action