Skip to content

Success Intent

The .success class provides a visual style for links and buttons that indicate a successful or positive action. Use it to highlight actions that lead to a successful outcome.

Apply .success to <a> elements or elements with [role="link"] to indicate a successful action.

live preview
editable html
<a href="#" class="success">Regular Link</a>

<hr>

<a href="#" aria-current="page" class="success">Active link</a>
<hr>
<button class="success" role="link">
  &lt;button&gt; as link
</button>

<hr>

<button role="link" aria-current="page" class="success">Active button</button>

<hr>

<div class="success" role="link">
  &lt;div&gt; as link
</div>

<hr>

<div role="link" aria-current="page" class="success">Active div</div>

Buttons

Apply .success to <button> elements or elements with [role="button"] for a success action button.

live preview
editable html
<div class="auto-grid">
  <button class="success">
    Button
  </button>
  
  <div class="success" role="button">
    &lt;div&gt; as button
  </div>
  
  <details>
    <summary class="success" 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 .success to an element with .card for a success action card.

live preview
See code

Modifiers

.success can be modified with .subtle to create cards with a more muted appearance, often used for less prominent actions.

live preview
See code

.success 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 success effect.

live preview
See code