Inline notifications are part of the page layout and persist in the page. A notification should be inline if it’s important for the user to see the message.
Inline notifications can optionally display an icon to help underscore the message.
Inline notifications can optionally be closable. Closable inline notifications display an X button at the far right; the notification hides when the user presses this button.
Success inline notification
Information inline notification
Warning inline notification
Error inline notification
Closable success inline notification
Warning inline notification with no icon
Information inline notification with an atypical icon
If you need to communicate a status — Success, Information, Warning, or Error — inline within the view, but don’t have much room in which to display it, consider using a status icon instead.
Notification message that displays inline with the data
Name
Type
Default
Description
type
string
'information'
Specifies the type of inline notification styling to display. One of “information”, “success”, “error”, or “warning”.
iconType
string
''
Optional: The name of the icon to display in the notification. You can find a list of all enterprise icons here. The use of custom icons is also supported. Leave this at its default value of blank to display no icon.
isClosable
boolean
false
Bind this property to true to allow the user to be able to dismiss the notification. Leave this property at its default value of false if the user should not be able to close the notification.
Error message notifications are typically not closable.
rui-inline-notification-close
event
Event fired when the use clicks the close button on the notification.
isNotificationDisplayed
boolean
true
Typically used as internal property, but can be used if notification is closed and needs to be visible again. If this is your case, bind to false on rui-inline-notification-close event and bind to true when you need to display it again.
Implementation
Begin by importing the rui-notifications module into your application.
Import the module
// import into app.module
import'@jkhy/responsive-ui-wc/components/rui-notifications/rui-notifications-imports';
Nest the notification content within a rui-inline-notification component.
Specify the type of notification with the type property.
You can optionally display an icon in the notification with the iconType property.
Bind the isClosable property to a value of true to make the notification closable.
Error message notifications are typically not closable.
Notification message that displays inline with the data
Name
Type
Default
Description
jhaType
string
'Information'
Specifies the type of inline notification styling to display. One of “Information”, “Success”, “Error”, or “Warning”.
jhaIconType
string
''
Optional: The name of the icon to display in the notification. You can find a list of all enterprise icons here. The use of custom icons is also supported. Leave this at its default value of blank to display no icon.
jhaIsClosable
boolean
false
Bind this property to true to allow the user to be able to dismiss the notification. Leave this property at its default value of false if the user should not be able to close the notification.
Error message notifications are typically not closable.
jhaDisplayNotification
boolean
true
Typically used as internal property, but can be used if notification is closed and needs to be visible again. If this is your case, bind to false on jhaInlineNotificationClose event and bind to true when you need to display it again.
jhaInlineNotificationClose
event
Event fired when the use clicks the close button on the notification.
Implementation
Begin by importing the JhaNotificationsModule module into your application.
Import the module
// import into app.module
import{JhaNotificationsModule}from'@jkhy/responsive-ui-angular/jha-notifications';@NgModule({imports:[...JhaNotificationsModule,...]})exportclassAppModule(){}
Nest the notification content within a jha-inline-notification component.
Specify the type of notification with the jhaType property.
You can optionally display an icon in the notification with the jhaIconType property.
Bind the jhaIsClosable property to a value of true to make the notification closable.
Error message notifications are typically not closable.