generated:catalog.entry.toast.title
generated:catalog.entry.toast.description
@xngui/components/toastimport { XToastService } from '@xngui/components/toast';chrome:demo.section
chrome:demo.preview
import { inject } from '@angular/core';
import { XToastService } from '@xngui/components/toast';
export class ExampleComponent {
private readonly xToastService = inject(XToastService);
showToast(): void {
this.xToastService.open({
message: 'Changes saved successfully.',
status: 'success',
});
}
}
chrome:demo.events.title
chrome:demo.events.empty
chrome:demo.api.title
x-toast
chrome:demo.api.col.property
chrome:demo.api.col.type
chrome:demo.api.col.default
chrome:demo.api.col.description
sizeXSize—Visual size tier — falls back to XConfigService when unset.
densityXDensity—Spacing offsets — orthogonal to `size`; falls back to XConfigService when unset.
itemXToastItem—Queued toast payload from XToastService.
dismissLabelstring—`aria-label` for the dismiss button — falls back to the `toast.dismiss` i18n key.
stackIndexnumber0Zero-based index in the collapsed stack (`0` = newest). Set by XToastViewport .
stackVisiblebooleantrueWhether this toast participates in the collapsed peek stack.
stackInteractingbooleanfalseWhen `true`, auto-dismiss is paused while the viewport stack is hovered or focused.