Do you follow best UI practices for delete buttons?

Loading last updated info...

Accidentally deleting important data can be a disaster for your users and your support team. A poorly placed or unclear destructive action can result in irreversible mistakes, lost data, and frustrated users.

These actions need to be carefully designed with strong visual cues, clear labels, and proper safeguards.

Use red for danger consistently

Delete buttons should always stand out with a red color. This is a well-established visual convention that immediately signals danger to users.

  • Use red only for destructive actions (not warnings or generic alerts)
  • Avoid using red buttons for neutral or positive actions
Image

❌ Figure: Bad example - Wrong color for a delete button

Image

✅ Figure: Good example - Red is the right color for a delete button

Note: If red is your branding primary color, you may use red for positive or neutral actions, as long as:

  • The context clearly communicates a positive intent (e.g., “Submit”, “Continue”, “Book now”)
  • Consistency is maintained across all UI elements
  • Ensure destructive actions are visually differentiated through contrast and hierarchy. E.g. A different tone of red and an appropriate icon

Use the right icon in the right position

Icons make buttons faster to recognize and reduce ambiguity. A trash can icon next to the label reinforces the nature of the action.

  • Always use the trash can (🗑️) or appropriate destructive icon
  • Place the icon to the left of the button label
  • Avoid ambiguous or abstract icons (E.g. Broom icon (🧹) is used for “clear all” or “clean up", not "delete". Cross icon () means “cancel” or "wrong", not "delete")
Image

❌ Figure: Bad example - Cross icon usually means "Cancel" and should be avoided for permanent deletion. The button is also missing a text label

Image

✅ Figure: Good example - Button has a Trash/Bin icon positioned to the left of the text labe

Position delete buttons with care

Placing a delete button next to a primary action (e.g. "Save" or "Confirm") is dangerous. Users may misclick due to proximity.

  • Place delete buttons away from primary actions
  • Use space or visual separation between them
  • Make destructive buttons less prominent (except when the primary purpose is deletion)
Image

❌ Figure: Bad example - "Delete" and "Save" are too close together, which can lead to accidental clicks

Image

✅ Figure: Good example - "Delete" button in red, with the right icon, and visually isolated from safe actions

Ask for confirmation when necessary

Not every destructive action needs a popup, but if the data is important or irreversible, you should ask the user to confirm.

Use confirmations when:

  • Deleting data that can’t be recovered (e.g. a database record or user profile)
  • The user might not realize the consequences
Image

✅ Figure: Good example - Confirming a deletion

Tip: Avoid overusing confirmations as they lead to alert fatigue.

Use tooltips

Sometimes you might have a UI with limited space that doesn’t allow text labels.

For icon-only delete buttons (for example, a red trash icon in a table row), always provide a tooltip on hover or focus.

Image

✅ Figure: Good example - Tooltip gives clarity to an icon-only delete button

Ensure accessibility and keyboard navigation

Don't rely solely on color to convey meaning — red may be hard to distinguish for users with color blindness.

  • Include a label, not just an icon
  • Make sure buttons can be navigated and triggered via keyboard
  • Support screen readers with aria-label="Delete project" or similar

Summary of best practices

ElementBest practice
ColorUse red for delete buttons
LabelAlways include a text label (e.g. "Delete", "Remove")
IconUse a trash can or similar, to the left of label
PlacementIsolate from primary/positive actions
ConfirmationUse when deletion is permanent or high-risk
AccessibilityDon't rely on color; support keyboard and screen readers

For more guidance on destructive actions in UI design:


Bug reports examples

Check out how SSW manages UI bugs across our many products and teams using YakShaver. Smarter workflows. Fewer distractions.

1. For YakShaver - UI Bug

<youtubeEmbed url="https://www.youtube.com/embed/5uij0YJa4I4/" description={"Video: ✨ UI Update - Relocate Delete Project Button (1 min)"} />

2. For TinaCMS - UI Bug

<youtubeEmbed url="https://www.youtube.com/embed/9h0Lp69K3Pk" description={"Video: 🐛 Bug - UI Button Color and Behavior Consistency (1 min)"} />
We open source.Loving SSW Rules? Star us on GitHub. Star