UNPKG

@progress/kendo-angular-notification

Version:

Kendo UI Notification for Angular

117 lines (116 loc) 4.22 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2026 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { TemplateRef, ViewContainerRef } from '@angular/core'; import { Position } from './position'; import { Animation } from './animation'; import { Type } from './type'; /** * Defines the settings for displaying a Notification. */ export declare class NotificationSettings { /** * Defines the content of the Notification. */ content: string | TemplateRef<any> | Function; /** * Specifies the time in milliseconds after which the * Notification will hide * ([see example](https://www.telerik.com/kendo-angular-ui/components/notification/hiding-notifications#defining-a-delay-before-hiding)). * * @default 5000 */ hideAfter?: number; /** * Defines the position of the Notification * ([see example](https://www.telerik.com/kendo-angular-ui/components/notification/positioning)). * * The possible values are: * * `horizontal: 'left'|'center'|'right'` * * `vertical: 'top'|'bottom'` * * @default { horizontal: 'right', vertical: 'top' } */ position?: Position; /** * Specifies the animation settings of the Notification * ([see example](https://www.telerik.com/kendo-angular-ui/components/notification/animations)). * * The possible values are: * * `duration`&mdash;Accepts a number in milliseconds. Defaults to `500ms`. * * `type?: 'slide'| (Default) 'fade'` * * @default { type: 'fade', duration: 500 } */ animation?: Animation; /** * Specifies if the Notification will require a user action to hide. * If you set the property to `true`, the Notification renders a **Close** button * ([see example](https://www.telerik.com/kendo-angular-ui/components/notification/hiding-notifications#defining-a-closable-notification)). * * The possible values are: * * (Default) `false` * * `true` * * @default false */ closable?: boolean; /** * Specifies the title of the close button. */ closeTitle?: string; /** * Specifies the type of the Notification * ([see example](https://www.telerik.com/kendo-angular-ui/components/notification/types)). * * The possible values are: * * `style: (Default) 'none'|'base'|'primary'|'secondary'|'tertiary'|'info'|'success'|'warning'|'error'|'inverse'` * * `icon: 'true'|'false'` * * @default { style: 'none', icon: true } */ type?: Type; /** * Specifies the width of the Notification. */ width?: number; /** * Specifies the height of the Notification. */ height?: number; /** * The value of the Notification element `aria-label` attribute. * * @default 'Notification' * * @remarks * This property is related to accessibility. */ notificationLabel?: string; /** * The value of the Notification element `role` attribute. * * @default 'status' * * @remarks * This property is related to accessibility. */ notificationRole?: string; /** * Specifies a list of CSS classes that you add to the Notification. * To apply CSS rules to the component, set `encapsulation` to `ViewEncapsulation.None` * ([see example](https://www.telerik.com/kendo-angular-ui/components/notification)). * * > To style the content of the Notification, use the `cssClass` property binding. */ cssClass?: string | Array<string> | object; /** * Defines the container to which the Notification will be appended * ([see example](https://www.telerik.com/kendo-angular-ui/components/notification/dynamic-containers)). * * If not provided, the Notification will be placed in the root component * of the application or in the `body` element of the document. */ appendTo?: ViewContainerRef; }