Popconfirm

Angular Bootstrap 5 Popconfirm component

Responsive popconfirm built with Bootstrap 5, Angular and Material Design. Popconfirm is a compact dialog alert. Use it to confirm/cancel a decision or display extra content like an explanation.

Popconfirm basically is a simple alert with confirmation buttons.

Note: Read the API tab to find all available options and advanced customization


Basic example

Basic example of popconfirm usage

You can create popconfirm dynamically from any component using a built-in service. To achieve this, follow these steps:

1. Create a new component with Angular CLI and add some HTML code to the template.

ng generate component popconfirm

2. Inject MdbPopconfirmService to the component from which you want to open the popconfirm and use the open method.


Inject and receive data

You can inject data to the modal by passing it to the data parameter in the popconfirm options.

Here is an example showing how to use injected data in the popconfirm component:

Receive data from the popconfrim

You can receive data from the popconfirm to use it in other components:

Here is an example showing how to use data received from popconfirmRef in other components


Display mode

You can choose between modal and inline to modify display mode.

Modal mode is rendered at the center of the screen and is static, you can't change its position but all other attributes can be applied


Icon example

You can add an icon to the message in the popconfirm by customizing the template


Inline positions

You can choose between different positions

Available positions: top left; top; top right; right top; right; right bottom; bottom right; bottom; bottom left; left bottom; left; left top;