Granite Alert
Vaadin global notifications (wrapper for https://github.com/LostInBrittany/granite-alert with themable support)
GraniteAlert is a container for other components, which are rendered inside the alert, and can be used as a way of displaying a global notification. The property level maps to the level attribute of granite-alert, with each level (info, warning, error and success) providing a different style. The property compact enables additional style rules that reduce spacing around the content.
It is also posible to injecting styles directly into the granite-alert shadow DOM, by using style modules (see examples)
Found a bug or have a suggestion? Report it on GitHub
For bug reports, feature suggestions, or questions, please open an issue on GitHub. This makes it easier for us to track and respond efficiently, ensuring you get the best possible support. Your input helps us improve—thank you!
Sample code
GraniteAlert alert = new GraniteAlert(); alert.setCompact(true); alert.setLevel(GraniteAlertLevel.SUCCESS); alert.add(new Span("Success!"));
<dom-module id="custom-granite-alert-theme" theme-for="granite-alert"> <template> <style> :host(.custom) .alert { color: var(--lumo-body-text-color); background-color: white; border-color: grey; } </style> </template> </dom-module>
Links
Compatibility
Was this helpful? Need more help?
Leave a comment or a question below. You can also join
the chat on Discord or
ask questions on StackOverflow.
Version
Initial release supporting Vaadin 14+ Npm mode
- Released
- 2020-04-13
- Maturity
- TESTED
- License
- Apache License 2.0
Compatibility
- Framework
- Vaadin 14+
- Vaadin 13 in 1.0.0
- Vaadin 12 in 1.0.0
- Vaadin 11 in 1.0.0
- Vaadin 10 in 1.0.0
- Browser
- Browser Independent
Speed Dial - Vaadin Add-on Directory
A material design - floating action button with speed dialOnline Demo
View on GitHub
Speed Dial version 1.1.0
Added support for all 11 CSS properties:
* `setColor(color)`
* `setPositionMode(position)`
* `setMarginRight(marginRight)`
* `setColorActionLabelText(color)`
* `setColorAction(color)`
...