Actions

Link

A text link in the body text style, underlined, that navigates with wire:navigate and marks itself when it points to the current page. Use it inside text and for secondary actions; for a link that looks like a button, use tk:button with href.

Read the Terms of Service before signing up.
Blade

An <a> with the text underlined, which loses the underline on hover. Clicking it navigates with wire:navigate, without a full page load. While the current URL is /terms or a page under it, the link has aria-current="page".

Opens in a new tab, without wire:navigate, with an icon after the text. target="_blank" on the tag does the same, and also adds rel="noopener noreferrer" when there is no rel.

Blade

Style #

The first has no underline until hovered, in smaller, muted text. The second builds the URL from a route and is blue.

Text style #

The props of tk:text work on a link: size, variant (strong, subtle, accent), color and weight.

Icons, badge and info #

The element props sit around the text: icon, icon-trailing, badge, and info for a help icon with a tooltip.

Disabled and no href #

disabled drops the href and sets aria-disabled. Without href or route the tag renders a <p> with the link style.

Disabled link

Not a link

Blade

Links built with @foreach. The one that points to the current page gets aria-current=page (here, Link); exact limits that to its own URL.

Customization #

Classes go to the <a>; prefixed attributes like icon-trailing: reach the icons.

Reference

Prop Type Default Description
underline bool true true underlines the link and removes the underline on hover; false does the opposite.

Also accepts the props of tk:text (size, scale, weight, variant, color), the element props (label, icon, iconTrailing, badge...), and what makes an element a link: href, route, parameters, external, navigate, current, exact, matchQuery. See Element.

Slots

Slot Description
default The link text, in place of label.

Customization

Classes and attributes go to the <a> element; the parts take the prefixes of the element props (icon:, icon-trailing:...).

blade

Accessibility

A native <a> with href, so it is reached with Tab and opened with Enter. The link to the current page gets aria-current="page". A disabled link (disabled) has no href, role="link" and aria-disabled="true".

Behavior notes

  • Without href or route, it renders a <p> with the link style and nothing to click.
  • Links to a file (.pdf, .zip...) and external links skip wire:navigate.
  • A link opened in a new tab (external or target="_blank") gets rel="noopener noreferrer", unless it sets its own rel.