Dialog
A window overlaid on either the primary window or another dialog window, rendering the content underneath inert.
Features
- Supports modal and non-modal modes.
- Focus is automatically trapped when modal.
- Can be controlled or uncontrolled.
- Esc closes the component automatically.
Installation
Provider
The initial configuration is defined by the provideRdxDialogConfig
provider during application startup.
In the component that will open the dialog, call provideRdxDialog
in the providers:
API Reference
Trigger
| |
| |
| Omit<RdxBaseDialogConfig<unknown>, "data"> |
Content
Accessibility
Adheres to the Dialog WAI-ARIA design pattern .
Usage
Service
To open a dialog via the service, simply call the RdxDialogService.open()
Inject Data to the Dialog
This ensures all type definitions are centralized in the component.
- Use
injectDialogData
to retrieve data and let the service infer the expected data type.
- Use
injectDialogRef
to declare the return type for better typing in DialogRef
.