Koala logo Design
No matches for “
↑↓ navigate open Esc close
Components Links

Links

One link helper, four variants — Body, Subtle, Rail, Emphasis. External links auto-add the new-tab icon and rel="noopener noreferrer". Replaces ~50 hand-rolled anchor signatures scattered across detail pages.

<koala-link>
<koala-link href="@quoteUrl">Open the quote</koala-link>

Default body variant — underline always visible, primary on hover. Uses Alpine-AJAX (x-target.push="main") by default.

4 variants
Body
Default. Permanent underline, primary on hover.
Subtle
Hover-underline only. Less visual noise inside dense info rows.
Rail
Detail-page right rail. Outline-coloured decoration; thicker on hover.
Emphasis
Brand-primary text, hover-underline. For inline links that should stand out ("Open settings", an org name).
<koala-link href="@url" variant="Body">View the transaction</koala-link>
<koala-link href="@url" variant="Subtle">View the transaction</koala-link>
<koala-link href="@url" variant="Rail">12 Lavender Hill, SW11 5RW</koala-link>
3 states
Hover
Hover it — Body turns primary; Subtle and Emphasis gain their underline
Focus
Tab to it — the browser focus outline

Hover is the only styled state and each variant carries its own treatment (described on the Variants tiles above): Body recolours to primary, Subtle and Emphasis reveal an underline, Rail thickens its outline-coloured decoration. There's no disabled link — if the destination isn't available, don't render a link.

<koala-link href="https://hoowla.example" external>Open in Hoowla</koala-link>

external sets target="_blank" + rel="noopener noreferrer" and appends an ArrowUpRight icon automatically.

<koala-link href="@url" icon="@(IconName.Pencil)" variant="Subtle">Edit</koala-link>

Hover for the Tippy popover. aria-describedby + a hidden description span are wired in for screen-reader parity.

7 attributes
Attribute Values Notes
href URL Required.
variant Body, Subtle, Rail Default Body.
external Boolean Opens in a new tab with the external-link icon.
icon IconName enum Leading icon before the link text.
tooltip String Tippy tooltip + screen-reader description.
ajax Boolean Default true for internal links (x-target.push="main"); false for external.
class Tailwind classes Merged with the variant's base classes.
Do Pick the variant by context — Body in prose, Subtle in dense info rows, Rail in the detail right rail, Emphasis for brand-coloured inline actions — and mark external destinations with external.
Don't Don't hand-roll text-primary hover:underline anchors — that's the Emphasis variant — and don't reach for a koala-btn when the affordance is a link.