Link button
A text link styled to match the button family, for navigation and low-emphasis actions.
Variants
primary
is the default.
<.link_button label="Back to log in" variant="primary" />
<.link_button label="View logs" variant="secondary" />
<.link_button label="Delete preview" variant="destructive" />
Sizes
Large is the default.
Underline
Underlined links stand out in running text and empty states.
<.link_button
label="Learn more"
size="medium"
underline
href="https://docs.tuist.dev"
target="_blank"
/>
<.link_button
label="Get started"
variant="secondary"
size="medium"
underline
href="https://docs.tuist.dev"
target="_blank"
/>
With icons
Icons sit before or after the label to show direction or that the link leaves the page.
<.link_button label="Previous run" variant="secondary">
<:icon_left><.chevron_left /></:icon_left>
</.link_button>
<.link_button label="Next run" variant="secondary">
<:icon_right><.chevron_right /></:icon_right>
</.link_button>
<.link_button label="Documentation" href="https://docs.tuist.dev" target="_blank">
<:icon_right><.external_link /></:icon_right>
</.link_button>
Guidelines
- Use a link button for navigation and secondary actions that should not compete with buttons, such as Learn more or Back to log in.
-
It always renders a link. Pass
hreffor regular browser navigation,navigateto move to another LiveView, andpatchto update the current one. -
Turn on
underlinewhen the link sits in running text or an empty state, so it reads as a link without hovering. -
Pass
target="_blank"for pages outside the product, such as documentation, and addrelwhen needed. -
Use
secondaryfor actions inside alerts and cards, and keepdestructivefor links that delete or revoke something.
API reference
<.link_button>
Also accepts global attributes, including targetrel.