[role="link"]
Any element with role="link" is rendered as a link.
This is useful when a non-link element (e.g. <button>, <div>) needs to behave and look like a link.
Basic Usage
live preview
editable html
<button role="link">
<button> as link
</button>
<hr>
<button role="link" aria-current="page">Active button</button>
<hr>
<div role="link">
<div> as link
</div>
<hr>
<div role="link" aria-current="page">Active div</div>Intent Variants
To convey intent and importance, links can be styled with different variants:
live preview
editable html
<section class="auto-grid">
<button class="primary" role="link">
<button> as link
</button>
<button class="secondary" role="link">
<button> as link
</button>
<button class="contrast" role="link">
<button> as link
</button>
<button class="success" role="link">
<button> as link
</button>
<button class="info" role="link">
<button> as link
</button>
<button class="warning" role="link">
<button> as link
</button>
<button class="danger" role="link">
<button> as link
</button>
</section>