# Confirm
> AstrolConfirm is the Blazor component that allows obtaining user confirmation before performing a critical or irreversible action.
Source page: https://doc.astrolui.com/basic-component/confirm
## 1. Demo AstrolConfirm
In this example, [notifications](/basic-component/notification) and [buttons](/basic-component/button) are implemented, so it is recommended to refer to their documentation for more details.
```razor
@using Astrol.JSInterop.Base
@inject AstrolJSInterop jsI
@using Astrol.Entities.Basic.UI
@using Astrol.Component.Basic.Button
@using Astrol.Component.Basic.Confirm
@using Astrol.Entities.Basic.Static.Notification
@code {
```
```csharp
private AstrolConfirm _conf = default!;
private async Task DeleteItem() {
var confirmed = await _conf.Confirmation("Are you sure?", "Do you want to delete the item?");
if (confirmed) {
await jsI.Notification("Item removed successfully.".NotificationSuccess());
}
else {
await jsI.Notification("Canceled action.".NotificationError());
}
}
}
```
### Usage details
- **Recommended**, with the service: **@inject IAstrolModal Modal** and **if (await Modal.ConfirmAsync("Title", "Message")) { ... }**. No component in the page and no **@ref** needed; options with **new ConfirmOptions { ... }**.
- With the component: place **** in your page with a field **private AstrolConfirm _conf;** and call **await _conf.Confirmation("Title", "Message");**, which returns **true** when accepted:
- **Title** (string) message title.
- **Message** (string) confirmation message.
- When it opens, focus is on **Accept** (Enter confirms) and **Esc** cancels.
### Supported parameters
- Draggable **(bool)**, the window can be moved (default **true**).
- ClosedInteractive **(bool)**, cancels when clicking outside or pressing **Esc** (default **true**).
- Class **(string)**, custom css class.
- Icon **(string)**, icon (default astrol-question-circle-o**).
- ButtonOutline **(bool)**, buttons without fill (default **false**).
- TextAccept / TextCancel **(string)**, button texts (default follows the app language).
- Width **(AstrolWidth)**, max width: Mini (300px), **Short (450px, default)**, Middle (768px), Large (1200px), Full (100%).
- Calling **Confirmation** while another confirmation is open makes the previous one return **false**.
- The same options exist in **ConfirmOptions** for **IAstrolModal.ConfirmAsync**.