@bimetal/toast-angular-components
v0.37.0
Published
Angular toast viewport — queue, auto-dismiss, pause-on-hover, variants, positioning, a11y. A thin standalone-component binding over the canonical toast controller. Bound-only: the app owns the controller it pushes to.
Maintainers
Readme
@bimetal/toast-angular-components
The Angular toast viewport — the BIMETAL component family's lightweight / feedback
member. A thin standalone-component binding over the canonical @bimetal/toast-headless
controller (queue, auto-dismiss, pause-on-hover, variants, positioning, a11y). No domain
dependency.
import { Component } from '@angular/core';
import { createToastControllerBinding } from '@bimetal/angular';
import { ToastViewportComponent } from '@bimetal/toast-angular-components';
import '@bimetal/toast-angular-components/styles';
@Component({
selector: 'app-root',
standalone: true,
imports: [ToastViewportComponent],
template: `
<button (click)="toasts.ctrl.push({ message: 'Gespeichert', variant: 'success' })">Save</button>
<bm-toast-viewport [controller]="toasts.ctrl" />
`,
})
export class AppComponent {
readonly toasts = createToastControllerBinding({ config: { position: 'bottom-end' } });
}The app decides the message and calls push(...); the viewport renders the stack.
Bound-only: you own the controller (it is what you push to).
