New to KendoReactLearn about KendoReact Free.

NotificationProps

Represents the props of the KendoReact Notification component.

NameTypeDefaultDescription

className?

string

Sets additional classes to the Notification.

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

closable?

boolean | DetailedHTMLProps<AnchorHTMLAttributes<HTMLAnchorElement>>

false

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.

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.

jsx
<Notification dir="rtl" />

onClose?

(event: NotificationEvent) => void

Fires when you click the Close button.

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

style?

React.CSSProperties

The styles that are applied to the Notification.

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

type?

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

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

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.
Not finding the help you need?
Contact Support