New to KendoReactStart a free 30-day trial

Represents the props of the KendoReact Notification component.

Definition

Package:@progress/kendo-react-notification

Properties

Sets additional classes to the Notification.

Example:
jsx
<Notification className="custom-class" />

closable?

boolean | DetailedHTMLProps​<AnchorHTMLAttributes​<HTMLAnchorElement>, HTMLAnchorElement>

Sets if the Notification requires a user action to hide. If the property is set to true, the Notification renders a Close button. If the property is set to an object, the Notification renders a Close button by extending the default props with the provided object.

Default:

false

Example:
jsx
<Notification closable={true} />
<Notification closable={{ title: 'Dismiss' }} />

The possible values are:

  • false
  • true
  • { title: 'Hide', ... }

dir?

string

Sets the dir HTML attribute, which determines the text direction.

Example:
jsx
<Notification dir="rtl" />

Specifies the time in milliseconds after which the Notification automatically closes.

Default:

5000

Example:
jsx
<Notification hideAfter={5000} onClose={(event) => console.log('closed')} />

onClose?

(event: NotificationEvent) => void

Fires when you click the Close button or when the hideAfter timeout expires.

Parameters:eventNotificationEvent
Example:
jsx
<Notification onClose={(event) => console.log('Notification closed', event)} />

style?

CSSProperties

The styles that are applied to the Notification.

Example:
jsx
<Notification style={{ backgroundColor: 'lightblue' }} />

type?

{ style?: "base" | "secondary" | "success" | "error" | "inverse" | "primary" | "tertiary" | "warning" | "info" | "none"; icon?: boolean }

Sets the Notification type, which determines its style and icon.

Example:
jsx
<Notification type={{ style: 'success', icon: true }} />

The possible values are:

  • style: 'none'|'success'|'error'|'warning'|'info'. The default is 'none'.
  • icon?: 'true'|'false'. The default is true.

webMcp?

boolean | WebMcpProps

Enables Web MCP tool registration for this component. Requires a parent WebMcpProvider from @progress/kendo-react-webmcp.