We are currently in alpha version.
Please expect changes. If you find any issues, please report them on our github.
Dialog
Dialogs are overlay UI elements that capture user attention for confirmations, dialogs, or inputs. They provide a focused interaction point, ensuring key actions or messages are acknowledged before proceeding.
Basic dialog
Preview
Code
Are you sure?
This action cannot be undone
Optional properties
Property | Type | Description |
---|---|---|
|
| Defines the dialog's shape. |
|
| Defines the dialog's position. |
| string | Sets the title of the dialog. Default is |
| string | Sets the text of the dialog. |
| string | Allows overriding default styles by passing Tailwind CSS classes. Utilize the |
Supported directives
Selector | Directive name | Description |
---|---|---|
| ZapDialogFooterDirective | A directive that enables customizing footer in the dialog. |
Example
Preview
Code
Are you sure?
Lorem ipsum dolor, sit amet consectetur adipisicing elit. Odit laudantium dolores ut voluptates quaerat consequuntur.
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
Colors
You can provide each of these colors for different themes that you use
Property | Description |
---|---|
| Background color of the dialog. |
| Text color of the dialog. |
| Text color of the title. |
| Border color of the dialog. |
| Color of the dismiss icon |
| Color of the dismiss icon when hovered |
| Background color of the primary button |
| Text color of the primary button |
| Border color of the primary button |
| Background color of the primary button when hovered |
| Text color of the primary button when hovered |
| Border color of the primary button when hovered |
| Background color of the secondary button |
| Text color of the secondary button |
| Border color of the secondary button |
| Background color of the secondary button when hovered |
| Text color of the secondary button when hovered |
| Border color of the secondary button 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 dialog's corners. |
| Left padding of the dialog. |
| Right padding of the dialog. |
| Top padding of the dialog. |
| Bottom padding of the dialog. |
| Padding around the dialog's content. |
| Width of the dialog. |
| Height of the dialog. |
| Font size of the title. |
| Font weight of the title. |
| Line height of the title. |
| Letter spacing of the title. |
| Font size of the dialog's text. |
| Font weight of the dialog's text. |
| Line height of the dialog's text. |
| Letter spacing of the dialog's text. |
| Font size of the dismiss element. |
| Font weight of the dismiss element. |
| Line height of the dismiss element. |
| Letter spacing of the dismiss element. |
| Font size of the primary button element. |
| Font weight of the primary button element. |
| Line height of the primary button element. |
| Letter spacing of the primary button element. |
| Font size of the secondary button element. |
| Font weight of the secondary button element. |
| Line height of the secondary button element. |
| Letter spacing of the secondary button element. |
| Border radius of the primary button |
| Border radius of the secondary button |