- Domino UI
- Components
- Alerts
Top Basic Context Dismissible Links Docs
Alerts
Displays a none floating message anywhere in the page, the message can be permanent or dismissible
This component can be themed based on context, for example:
- Success
- Info
- Warning
- Error
Example:
Alert.success()
.appendChild("Well done! ")
.appendChild("You successfully read this important alert message.")
See also :
Anatomy
- Alert body, can contain any other components or elements.
- Dismiss alert button.
Examples
Basic alerts Simple alerts with custom look and feel.
Context alerts Alerts with predefined colors to match the context.
Dismissible alerts Alerts that can be manually dismissed by the user.
Links in alerts Alerts can have links or other types of components.
Constructors
public void Alert()
Creates an Alert message without assuming a specific context, context can be applied by adding a context css class like dui_success, dui_error, dui_info, .. etc
Static methods
public static Alert create()
Factory method to create an Alert message without assuming a specific context, context can be applied by adding a context css class like
dui_success, dui_error, dui_info, .. etc
Returns:
new Alert instance
public static Alert primary()
Factory method to create an Alert with primary context, primary context will set the message background to the theme primary context color
Returns:
new Alert instance
public static Alert secondary()
Factory method to create an Alert with secondary context, primary context will set the message background to the theme secondary context color
Returns:
new Alert instance
public static Alert dominant()
Factory method to create an Alert with dominant context, primary context will set the message background to the theme dominant context color
Returns:
new Alert instance
public static Alert success()
Factory method to create an Alert with success context, primary context will set the message background to the theme success context color
Returns:
new Alert instance
public static Alert info()
Factory method to create an Alert with info context, primary context will set the message background to the theme info context color
Returns:
new Alert instance
public static Alert warning()
Factory method to create an Alert with warning context, primary context will set the message background to the theme warning context color
Returns:
new Alert instance
public static Alert error()
Factory method to create an Alert with error context, primary context will set the message background to the theme error context color
Returns:
new Alert instance