Toast
Temporary non-blocking notification.
Generated from the package's public source.
API
Closecomponent
@solidiom/toast — Headless toast notification primitive. Parts: Region, Root, Title, Description, Close. API: createToaster() for programmatic queue control.
Close(props: ToastCloseProps): Element
Props
class?stringtoastId?string— Toast id to dismiss. If omitted, reads from nearest Root's data-toast-id.
children: Element
createToasterfunction
@solidiom/toast — Headless toast notification primitive. Parts: Region, Root, Title, Description, Close. API: createToaster() for programmatic queue control.
createToaster(options: ToasterOptions): ToasterApi
Descriptioncomponent
@solidiom/toast — Headless toast notification primitive. Parts: Region, Root, Title, Description, Close. API: createToaster() for programmatic queue control.
Description(props: ToastDescriptionProps): Element
Props
class?string
children: Element
Regioncomponent
@solidiom/toast — Headless toast notification primitive. Parts: Region, Root, Title, Description, Close. API: createToaster() for programmatic queue control.
Region(props: ToastRegionProps): Element
Props
label?string— Custom aria-label. Default: "Notifications".toasterToasterApi— Toaster API from createToaster().
children: Element | (toasts: () => ToastEntry[]) => Element
Rootcomponent
@solidiom/toast — Headless toast notification primitive. Parts: Region, Root, Title, Description, Close. API: createToaster() for programmatic queue control.
Root(props: ToastRootProps): Element
Props
class?stringstyle?string | CSSPropertiestoastIdstring— Toast entry id for dismissal.
children: Element
Titlecomponent
@solidiom/toast — Headless toast notification primitive. Parts: Region, Root, Title, Description, Close. API: createToaster() for programmatic queue control.
Title(props: ToastTitleProps): Element
Props
class?string
children: Element
ToastClosePropsinterface
@solidiom/toast — Headless toast notification primitive. Parts: Region, Root, Title, Description, Close. API: createToaster() for programmatic queue control.
Props
class?stringtoastId?string— Toast id to dismiss. If omitted, reads from nearest Root's data-toast-id.
children: Element
ToastContextValueinterface
Props
dismiss(id: string) => void— Dismiss a toast by id.pause() => void— Pause all auto-dismiss timers (hover).pausedAccessor<boolean>— Whether timers are paused.resume() => void— Resume all auto-dismiss timers.toastsAccessor<ToastEntry[]>— Currently visible toasts (FIFO, capped by max).
ToastDescriptionPropsinterface
@solidiom/toast — Headless toast notification primitive. Parts: Region, Root, Title, Description, Close. API: createToaster() for programmatic queue control.
Props
class?string
children: Element
ToastEntryinterface
Props
description?string— Optional description body.durationnumber— Auto-dismiss duration in ms. 0 disables auto-dismiss.idstring— Unique identifier.onDismiss?() => void— Called when the toast is dismissed.titlestring— Toast title text.
ToasterApiinterface
@solidiom/toast — Headless toast notification primitive. Parts: Region, Root, Title, Description, Close. API: createToaster() for programmatic queue control.
Props
dismiss(id: string) => void— Dismiss a toast by id.toast(entry: Omit<ToastEntry, "id" | "duration"> & { … }) => string— Add a toast to the queue. Returns the toast id.toasts() => ToastEntry[]— Reactive accessor to the current toast list.
ToasterOptionsinterface
@solidiom/toast — Headless toast notification primitive. Parts: Region, Root, Title, Description, Close. API: createToaster() for programmatic queue control.
Props
defaultDuration?number— Default duration in ms. Default: 5000.max?number— Maximum visible toasts. Default: 3.
ToastRegionPropsinterface
@solidiom/toast — Headless toast notification primitive. Parts: Region, Root, Title, Description, Close. API: createToaster() for programmatic queue control.
Props
label?string— Custom aria-label. Default: "Notifications".toasterToasterApi— Toaster API from createToaster().
children: Element | (toasts: () => ToastEntry[]) => Element
ToastRootPropsinterface
@solidiom/toast — Headless toast notification primitive. Parts: Region, Root, Title, Description, Close. API: createToaster() for programmatic queue control.
Props
class?stringstyle?string | CSSPropertiestoastIdstring— Toast entry id for dismissal.
children: Element
ToastTitlePropsinterface
@solidiom/toast — Headless toast notification primitive. Parts: Region, Root, Title, Description, Close. API: createToaster() for programmatic queue control.
Props
class?string
children: Element