We are currently in alpha version.
Please expect changes. If you find any issues, please report them on our github.
Alert
Alerts are crucial UI elements used to convey important messages to users. They serve as a way to display notifications, warnings, confirmations, or error messages in an application.
Basic alert
Preview
Code
Optional properties
Property | Type | Description |
---|---|---|
|
| Defines the alert type. |
|
| Defines the alert's shape. |
|
| Defines the alert's variant. |
| string | Specifies a Font Awesome class for the alert's icon (e.g., |
| string | Allows overriding default styles by passing Tailwind CSS classes. Utilize the |
Error alert with icon and custom text
Preview
Code
There is an issue with:
- Saving the document
- Sending the email
Supported directives
Selector | Directive name | Description |
---|---|---|
| ZapIconDirective | A directive that enables adding any type of icon to a alert, including SVGs, font-based icons, and more. |
Example
Preview
Code
Global configurations
A list of global styles, including shape, size, color, font sizes, font weights, and letter spacing can be provided via themeLibrary
in the provideZapOption
provider.. If you have multi theme setup, you can also provide theme specific colors. These apply to all default variants through out the app unless component level styles are provided.
Example
app.config.ts
Shape and Size
Property | Description |
---|---|
| Defines the shape of the alert. Can be |
Colors
You can provide each of these colors for different themes that you use
Property | Description |
---|---|
| Background color of the alert. |
| Text color of the alert. |
| Border color of the alert. |
| Color of the dismiss icon |
| Color of the dismiss icon when hovered |
Other styles
You can provide a bunch of other styles, that are not theme based but rather generic
Property | Description |
---|---|
| Defines the radius of the alert's corners. |
| Left padding of the alert. |
| Right padding of the alert. |
| Top padding of the alert. |
| Bottom padding of the alert. |
| Padding around the alert's content. |
| Width of the alert. |
| Height of the alert. |
| Font size of the alert's text. |
| Font weight of the alert's text. |
| Line height of the alert's text. |
| Letter spacing of the alert's text. |
| Transforms the alert's text (e.g., uppercase, lowercase). |