| Name | Type | Default |
|
appendContainer
# |
string
|
null
|
If set, specifies the notification container. The value of appendContainer should be a string with the id of the container element preceded by "#".
|
|
autoOpen
# |
boolean
|
false
|
Sets or gets whether the notification will open automatically.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxNotification from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxnotification';
function App() {
const myNotification = useRef<JqxNotification>(null);
return (
<JqxNotification ref={myNotification} autoOpen={true}>
Sample Notification
</JqxNotification>
);
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
animationOpenDelay
# |
number
|
400
|
Sets or gets the duration of the notification animation at open.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxNotification from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxnotification';
function App() {
const myNotification = useRef<JqxNotification>(null);
return (
<JqxNotification ref={myNotification} autoOpen={true} animationOpenDelay={600}>
Sample Notification
</JqxNotification>
);
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
animationCloseDelay
# |
number
|
800
|
Sets or gets the duration of the tooltip animation at close.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxNotification from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxnotification';
function App() {
const myNotification = useRef<JqxNotification>(null);
return (
<JqxNotification ref={myNotification} autoOpen={true} animationCloseDelay={1000}>
Sample Notification
</JqxNotification>
);
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
autoClose
# |
boolean
|
true
|
Sets or gets whether the notification will automatically close after duration equal to the autoCloseDelay property.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxNotification from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxnotification';
function App() {
const myNotification = useRef<JqxNotification>(null);
return (
<JqxNotification ref={myNotification} autoOpen={true} autoClose={false}>
Sample Notification
</JqxNotification>
);
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
autoCloseDelay
# |
number | string
|
3000
|
Sets or gets the duration after which the notification automatically closes (works only if the autoClose property is set to true).
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxNotification from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxnotification';
function App() {
const myNotification = useRef<JqxNotification>(null);
return (
<JqxNotification ref={myNotification} autoOpen={true} autoCloseDelay={5000}>
Sample Notification
</JqxNotification>
);
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
blink
# |
boolean
|
false
|
Sets or gets whether the notification blinks when opened.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxNotification from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxnotification';
function App() {
const myNotification = useRef<JqxNotification>(null);
return (
<JqxNotification ref={myNotification} autoOpen={true} blink={true}>
Sample Notification
</JqxNotification>
);
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
browserBoundsOffset
# |
number
|
5
|
Sets ot gets the notifications' offset from the window bounds.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxNotification from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxnotification';
function App() {
const myNotification = useRef<JqxNotification>(null);
return (
<JqxNotification ref={myNotification} autoOpen={true} browserBoundsOffset={10}>
Sample Notification
</JqxNotification>
);
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
closeOnClick
# |
boolean
|
true
|
Sets or gets whether the notification will close if it is clicked.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxNotification from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxnotification';
function App() {
const myNotification = useRef<JqxNotification>(null);
return (
<JqxNotification ref={myNotification} autoOpen={true} closeOnClick={false}>
Sample Notification
</JqxNotification>
);
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
disabled
# |
boolean
|
false
|
Sets or gets whether the notification is disabled (it cannot be opened).
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxNotification from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxnotification';
function App() {
const myNotification = useRef<JqxNotification>(null);
return (
<JqxNotification ref={myNotification} autoOpen={true} disabled={true}>
Sample Notification
</JqxNotification>
);
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
height
# |
number | string
|
'auto'
|
Sets ot gets the notification's height.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxNotification from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxnotification';
function App() {
const myNotification = useRef<JqxNotification>(null);
return (
<JqxNotification ref={myNotification} autoOpen={true} height={200}>
Sample Notification
</JqxNotification>
);
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
hoverOpacity
# |
number
|
1
|
Sets or gets the notification's opacity when it is hovered with the mouse.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxNotification from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxnotification';
function App() {
const myNotification = useRef<JqxNotification>(null);
return (
<JqxNotification ref={myNotification} autoOpen={true} hoverOpacity={0.3}>
Sample Notification
</JqxNotification>
);
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
icon
# |
NotificationIcon
|
null
|
Interface NotificationIcon { width?: number | string; height?: number | string; url?: string; padding?: number | string; }
Sets or gets an object which specifies a custom notification icon. The icon property is disregarded if template is set.
object fields:
width
height
url
padding - specifies the distance from the icon to the content.
|
|
notificationOffset
# |
number
|
5
|
Sets or gets the offset between notifications.
|
|
opacity
# |
number
|
0.9
|
Sets or gets the notification's opacity.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxNotification from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxnotification';
function App() {
const myNotification = useRef<JqxNotification>(null);
return (
<JqxNotification ref={myNotification} autoOpen={true} opacity={1}>
Sample Notification
</JqxNotification>
);
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
position
# |
NotificationPosition
|
'top-right'
|
NotificationPosition: "top-left" | "top-right" | "bottom-left" | "bottom-right"
Sets the part of the browser window where the notifications will be positioned. The position property is disregarded if appendContainer is set.
Possible Values:
'top-left'
'top-right'
'bottom-left'
'bottom-right'
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxNotification from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxnotification';
function App() {
const myNotification = useRef<JqxNotification>(null);
return (
<JqxNotification ref={myNotification} autoOpen={true} position={'top-left'}>
Sample Notification
</JqxNotification>
);
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
rtl
# |
boolean
|
false
|
Sets or gets a value indicating whether widget's elements are aligned to support locales using right-to-left fonts.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxNotification from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxnotification';
function App() {
const myNotification = useRef<JqxNotification>(null);
return (
<JqxNotification ref={myNotification} autoOpen={true} rtl={true}>
Sample Notification
</JqxNotification>
);
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
showCloseButton
# |
boolean
|
true
|
Sets or gets whether to show the notification's close button.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxNotification from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxnotification';
function App() {
const myNotification = useRef<JqxNotification>(null);
return (
<JqxNotification ref={myNotification} autoOpen={true} showCloseButton={false}>
Sample Notification
</JqxNotification>
);
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
template
# |
NotificationTemplate
|
'info'
|
NotificationTemplate: "info" | "warning" | "success" | "error" | "mail" | "time" | "null"
Sets or gets the notification template.
Possible Values:
'info'
'warning'
'success'
'error'
'mail'
'time'
null
If template is set to null, the theme setting is applied to the notification. In that case, the notification icon can be set with the icon property.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxNotification from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxnotification';
function App() {
const myNotification = useRef<JqxNotification>(null);
return (
<JqxNotification ref={myNotification} autoOpen={true} template={'success'}>
Sample Notification
</JqxNotification>
);
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
theme
# |
string
|
''
|
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxNotification from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxnotification';
function App() {
const myNotification = useRef<JqxNotification>(null);
return (
<JqxNotification ref={myNotification} autoOpen={true} theme={'material'}>
Sample Notification
</JqxNotification>
);
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
width
# |
string | number
|
'auto'
|
Sets ot gets the notification's width.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxNotification from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxnotification';
function App() {
const myNotification = useRef<JqxNotification>(null);
return (
<JqxNotification ref={myNotification} autoOpen={true} width={200}>
Sample Notification
</JqxNotification>
);
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
|
|
close
# |
Event
|
|
This event is triggered when the notification is closed.
Code examples #
Bind to the close event of jqxNotification.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxNotification from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxnotification';
function App() {
const myNotification = useRef<JqxNotification>(null);
const onClose = (_e: Event): void => {
alert('do something...');
};
return (
<JqxNotification ref={myNotification} onClose={onClose} autoOpen={true}>
Sample Notification
</JqxNotification>
);
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
click
# |
Event
|
|
This event is triggered when the notification is clicked.
Code examples #
Bind to the click event of jqxNotification.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxNotification from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxnotification';
function App() {
const myNotification = useRef<JqxNotification>(null);
const onClick = (_e: Event): void => {
alert('do something...');
};
return (
<JqxNotification ref={myNotification} onClick={onClick} autoOpen={true}>
Sample Notification
</JqxNotification>
);
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
open
# |
Event
|
|
This event is triggered when the notification is opened.
Code examples #
Bind to the open event of jqxNotification.
import { createRoot } from 'react-dom/client';
import { useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxNotification from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxnotification';
function App() {
const myNotification = useRef<JqxNotification>(null);
const onOpen = (_e: Event): void => {
alert('do something...');
};
return (
<JqxNotification ref={myNotification} onOpen={onOpen} autoOpen={true}>
Sample Notification
</JqxNotification>
);
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
|
| Name | Arguments | Return Type |
|
closeAll
# |
None
|
|
Closes all notification instances.
|
|
closeLast
# |
None
|
|
Closes the last notification instances.
|
|
destroy
# |
None
|
|
Destroys the widget.
import { createRoot } from 'react-dom/client';
import { useEffect, useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxNotification from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxnotification';
function App() {
const myNotification = useRef<JqxNotification>(null);
useEffect(() => {
myNotification.current!.destroy();
}, []);
return (
<JqxNotification ref={myNotification} autoOpen={true}>
Sample Notification
</JqxNotification>
);
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
open
# |
None
|
|
|
|
|
refresh
# |
None
|
|
Refreshes the widget.
import { createRoot } from 'react-dom/client';
import { useEffect, useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxNotification from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxnotification';
function App() {
const myNotification = useRef<JqxNotification>(null);
useEffect(() => {
myNotification.current!.refresh();
}, []);
return (
<JqxNotification ref={myNotification} autoOpen={true}>
Sample Notification
</JqxNotification>
);
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|
|
render
# |
None
|
|
Renders the widget.
import { createRoot } from 'react-dom/client';
import { useEffect, useRef } from 'react';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxNotification from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxnotification';
function App() {
const myNotification = useRef<JqxNotification>(null);
useEffect(() => {
myNotification.current!.render();
}, []);
return (
<JqxNotification ref={myNotification} autoOpen={true}>
Sample Notification
</JqxNotification>
);
}
createRoot(document.querySelector('#app') as HTMLElement).render(<App />);
|