Сервис Toast-уведомлений для Angular | ng-hub-ui-toast

Standalone-сервис toast-уведомлений для Angular с Signals, observable жизненного цикла, индикатором прогресса, шестью позициями и полной темизацией через CSS-переменные.

Стили

Миксины и стили

Override any of the `--hub-toast-*` design tokens in a single include. Every parameter is OPTIONAL and defaults to `null`: only the parameters you pass are emitted, so the rest keep the component's defaults. Token-based and self-contained (no Bootstrap dependencies).

Theming with hub-toast-theme
МиксинПараметрыОписание
Theming
hub-toast-theme()
$accent--hub-toast-accent
$bg--hub-toast-bg
$color--hub-toast-color
$border--hub-toast-border
$border-width--hub-toast-border-width
$border-radius--hub-toast-border-radius
$shadow--hub-toast-shadow
$min-width--hub-toast-min-width
$max-width--hub-toast-max-width
$padding-x--hub-toast-padding-x
$padding-y--hub-toast-padding-y
$gap--hub-toast-gap
$font-size--hub-toast-font-size
$title-font-size--hub-toast-title-font-size
$title-font-weight--hub-toast-title-font-weight
$progress-bg--hub-toast-progress-bg
$progress-height--hub-toast-progress-height
$close-opacity--hub-toast-close-opacity
$close-opacity-hover--hub-toast-close-opacity-hover
$container-gap--hub-toast-container-gap
$container-offset--hub-toast-container-offset
$container-z-index--hub-toast-container-zindex
One-call theming for `<hub-toast>` notifications

CSS-переменные

Тематизируйте каждый пиксель с помощью 22 CSS-переменных. Переопределите их в :root или ограничьте их областью обёртки.

Toast

Design tokens read by this component. Override them on the host element (or any ancestor) to customize; every default falls back to the ng-hub-ui-ds layer.

ПеременнаяПо умолчаниюТипОписание
--hub-toast-accentvar(--hub-sys-border-color-default, #dee2e6)color Цвет левой границы или подсветки; устанавливается автоматически из семейства токенов DS для встроенных типов.
--hub-toast-bgvar(--hub-sys-surface-page, #fff)color Цвет фона карточки toast.
--hub-toast-bordervar(--hub-sys-border-color-default, #dee2e6)border Toast border color (per type → the accent)
--hub-toast-border-radiusvar(--hub-ref-radius-md, 0.375rem)length Радиус скругления углов карточки toast.
--hub-toast-border-widthvar(--hub-ref-border-width, 1px)length Toast border width
--hub-toast-close-opacity0.5number Close button opacity
--hub-toast-close-opacity-hover1number Close button hover opacity
--hub-toast-colorvar(--hub-sys-text-primary, #212529)color Цвет текста тела toast.
--hub-toast-container-gapvar(--hub-ref-space-2, 0.5rem)length Вертикальный промежуток между соседними toast в контейнере.
--hub-toast-container-offsetvar(--hub-ref-space-3, 1rem)length Расстояние от края экрана до контейнера.
--hub-toast-container-zindexvar(--hub-sys-zindex-toast, 1090)number Порядок наложения контейнера toast относительно других оверлеев.
--hub-toast-font-sizevar(--hub-ref-font-size-base, 1rem)length Toast font size
--hub-toast-gapvar(--hub-ref-space-1, 0.25rem)length Промежуток между сложенными в стек toast в контейнере.
--hub-toast-max-width26remlength Максимальная ширина каждой карточки toast.
--hub-toast-min-width18remlength Toast minimum width
--hub-toast-padding-xvar(--hub-ref-space-3, 1rem)length Горизонтальные отступы внутри тела toast.
--hub-toast-padding-yvar(--hub-ref-space-3, 1rem)length Вертикальные отступы внутри тела toast.
--hub-toast-progress-bgcolor-mix(in oklch, var(--hub-toast-accent) 30%, transparent)color Цвет заполнения индикатора прогресса.
--hub-toast-progress-height0.25remlength Высота полосы индикатора прогресса.
--hub-toast-shadowvar(--hub-sys-shadow-md, 0 0.5rem 1rem rgba(0, 0, 0, 0.15))shadow Тень, отбрасываемая карточкой toast.
--hub-toast-title-font-sizevar(--hub-ref-font-size-base, 1rem)length Размер шрифта заголовка тоста.
--hub-toast-title-font-weightvar(--hub-ref-font-weight-semibold, 600)number Насыщенность шрифта заголовка тоста.