Link
A link that presses as a button does, and that the browser follows.
<script>
import Link from '@brumate/ui/Link.brm';
</script>
<Link class="ui-link" href="#links">A link</Link>
<Link class="ui-link" href="#links" isCurrent>The current page</Link>
<Link class="ui-link" href="#links" isDisabled>A disabled link</Link>
- With
href, it is an<a>. Without, it is an element withrole="link". isCurrentsetsaria-current="page"anddata-current, for the link of the page that is open.- A disabled link is a
<span>with nohrefandaria-disabled, so the browser does not follow it. It leaves the order of Tab, as in React Aria. - It shows the attributes of a Button, and
data-current. - A part around it, such as a PreviewTrigger, gives it props and handlers through its context. Their handlers run first, then yours.