DeleteResource
Implemented BlocksType-to-confirm dialog with error and pending states; POST integration for real resources.
Kumo reference: kumo-ui.com/blocks/delete-resource/
Presentation commands show demo feedback. Read the interaction guide to connect real actions.
Zone confirmation
Show template
{% load wdj %}
{% include "wdj/components/delete_resource.html" with id="delete_zone_confirmation" demo=True resource_type="Zone" resource_name="example.com" only %}
Worker confirmation
Show template
{% load wdj %}
{% include "wdj/components/delete_resource.html" with id="delete_worker_confirmation" demo=True resource_type="Worker" resource_name="api-gateway-worker" only %}
Server error
Show template
{% load wdj %}
{% include "wdj/components/delete_resource.html" with id="delete_server_error" demo=True resource_type="Zone" resource_name="example.com" error_message="The demo resource is locked." only %}
Case insensitive
Show template
{% load wdj %}
{% include "wdj/components/delete_resource.html" with id="delete_case_insensitive" demo=True resource_type="Worker" resource_name="API-Gateway" case_sensitive=False only %}
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
| id | string | unset | Stable unique DOM ID; important for HTMX targets and focus restoration. |
| resource_type | string | unset | Resource type; pass the documented value shown in the examples. |
| resource_name | string | unset | Resource name; pass the documented value shown in the examples. |
| size | string | base | Size; pass the documented value shown in the examples. |
| case_sensitive | bool | False | Case sensitive; pass the documented value shown in the examples. |
| action | URL | unset | Action; pass the documented value shown in the examples. |
| csrf_token | string | unset | Pass csrf_token=csrf_token for DeleteResource POST integrations using include only; retain Django CSRF middleware. |
| hx_target | string | unset | Hx target; pass the documented value shown in the examples. |
| hx_swap | string | unset | Hx swap; pass the documented value shown in the examples. |
| deleting | bool | False | Deleting; pass the documented value shown in the examples. |
| error_message | string | unset | Error message; pass the documented value shown in the examples. |
| delete_button_text | string | unset | Delete button text; pass the documented value shown in the examples. |
| demo | bool | False | Demo; pass the documented value shown in the examples. |
| attrs | dict | {} | Dictionary of escaped native, HTMX or Alpine attributes. Literal Tailwind classes only. |
| class | string | "" | Class; pass the documented value shown in the examples. |