Danger Intent
The .danger class provides a visual style for links and buttons that indicate a dangerous or negative action. Use it to highlight actions that could have harmful consequences.
Links
Apply .danger to <a> elements or elements with [role="link"] to indicate a dangerous action.
live preview
editable html
<a href="#" class="danger">Regular Link</a>
<hr>
<a href="#" aria-current="page" class="danger">Active link</a>
<hr>
<button class="danger" role="link">
<button> as link
</button>
<hr>
<button role="link" aria-current="page" class="danger">Active button</button>
<hr>
<div class="danger" role="link">
<div> as link
</div>
<hr>
<div role="link" aria-current="page" class="danger">Active div</div>Buttons
Apply .danger to <button> elements or elements with [role="button"] for a danger action button.
live preview
editable html
<div class="auto-grid">
<button class="danger">
Button
</button>
<div class="danger" role="button">
<div> as button
</div>
<details>
<summary class="danger" role="button" aria-haspopup="menu">
Dropdown as a button
</summary>
<ul role="menu">
<li><a role="menuitem" href="#">Solid</a></li>
<li><a role="menuitem" href="#">Liquid</a></li>
<li><a role="menuitem" href="#">Gas</a></li>
<li><a role="menuitem" href="#">Plasma</a></li>
</ul>
</details>
</div>Cards
Apply .danger to an element with .card for a danger action card.
live preview
Modifiers
.danger can be modified with .subtle to create cards with a more muted appearance, often used for less prominent actions.
live preview
.danger can be modified with .ghost to create ghost buttons and cards, which have a transparent background and a border, making them less visually prominent while still maintaining the danger effect.
live preview