Guidelines for implementing safe, clear, and intentional deletion workflows that protect users from unintended data loss.
Deletion is a critical operation that permanently removes data from the system. Unlike other actions, deletion often cannot be undone and can have serious consequences for business activities. These guidelines ensure users make informed decisions and prevent accidental data loss.
Types of deletions
Permanent Deletion
Data is irreversibly destroyed and cannot be recovered. Use when:
Regulatory or privacy requirements mandate data destruction
Storage constraints require permanent removal
Data has no business value for retention
Examples: Deleting customer personal data (GDPR compliance), purging old logs, removing test data
Soft Deletion (Recommended)
Data is hidden or marked as deleted but can be restored within a timeframe. Use when:
Users may need to recover deleted items
Audit trails are important
Regulatory compliance requires retention
Examples: Deleted products, deactivating integrations, moving items to trash
Implementation: Mark items as "deleted" with a timestamp, allow restoration within 30 days, then permanently delete.
Displaying destructive actions within the interface
Use destructive components
Use the Destructive Button variant to signal critical actions. Destructive actions should be nested in an ActionMenu under a MenuButton and regrouped all together at the end of the menu, or placed in non-intrusive locations where they are not immediately visible to users.
Normal actions vs critical actions
Implementation examples
Example of destructive button in a page title:
Action menu with a destructive ActionMenuItem
Dos:
Nest the action in an ActionMenu - using a Destructive ActionMenuItem - under a MenuButton
Group all destructive actions at the end of the list
Don't
Show a destructive action as primary action in PageTitle
Example of a destructive button in a datatable:
Datatable using trailing actions in an actionMenu with a destructive action
Dos
Use datatable trailing actions with an ActionMenu to nest the critical action
Don't
Use datatable trailing actions with button to show the critical action within the datatable
Example of a destructive button in bulk actions:
Dos
Nest the critical action under the additional actions MenuButton
Don't
Use a button directly visible within the bulk bar
Always ask user confirmation
All deletion actions must be confirmed by users through a non-skippable confirmation modal. This ensures users understand what will be deleted and prevents accidental data loss. Never allow direct deletion through a single click or keyboard shortcut without explicit confirmation.
Simple destructive confirmation Modal
Critical deletion
Critical actions have serious, often irreversible consequences for business activities such as deleting data, canceling orders, disabling integrations, or removing configurations.
What are critical actions?
Operations that:
Permanently delete, deactivate or destroy data (products, orders, stores, configurations) that will have a business impact