Contrast Intent
The .contrast class provides a high-contrast visual style for links, buttons, and accordion elements. Use it to draw attention or indicate primary actions in high-visibility contexts.
Links
Apply .contrast to <a> elements or elements with [role="link"] to emphasize them.
<a href="#" class="contrast">Regular Link</a>
<hr>
<a href="#" aria-current="page" class="contrast">Active link</a>
<hr>
<button class="contrast" role="link">
<button> as link
</button>
<hr>
<button role="link" aria-current="page" class="contrast">Active button</button>
<hr>
<div class="contrast" role="link">
<div> as link
</div>
<hr>
<div role="link" aria-current="page" class="contrast">Active div</div>Buttons
Apply .contrast to <button> elements or elements with [role="button"] for a contrast action button.
<div class="auto-grid">
<button class="contrast">
Button
</button>
<div class="contrast" role="button">
<div> as button
</div>
<details>
<summary class="contrast" 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 .contrast to an element with .card for a contrast action card.
Modifiers
.contrast can be modified with .subtle to create cards with a more muted appearance, often used for less prominent actions.
.contrast 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 contrast effect.