Link

readyNot reviewed for a11y
This page may be removed. Primer plans to move all Rails component documentation to Lookbook.

Description

Use Link for navigating from one page to another. Link styles anchor tags with default blue styling and hover text-decoration.

Arguments

NameRequiredDescription
href
String

URL to be used for the Link. Required. If the requirements are not met an error will be raised in non production environments. In production, an empty link element will be rendered.

scheme
Symbol

One of :default, :primary, or :secondary.

muted
Boolean

Uses light gray for Link color, and blue on hover.

underline
Boolean

Whether or not to underline the link.

system_arguments

Slots

tooltip

Tooltip that appears on mouse hover or keyboard focus over the link. Use tooltips sparingly and as a last resort. Important: This tooltip defaults to type: :description. In a few scenarios, type: :label may be more appropriate. The tooltip will appear adjacent to the anchor element. Both the tooltip and the anchor will be nested under a positioning wrapper. Consult the Primer::Alpha::Tooltip documentation for more information.

NameRequiredDescription
type
Symbol

One of :description or :label.

system_arguments
Hash

Same arguments as Primer::Alpha::Tooltip.

leading_visual

Leading visuals appear to the left of the link text.

Use:

  • leading_visual_icon which accepts the arguments accepted by Primer::Beta::Octicon.
NameRequiredDescription
system_arguments
Hash

Same arguments as Primer::Beta::Octicon.

trailing_visual

Trailing visuals appear to the right of the link text.

Use:

  • trailing_visual_icon which accepts the arguments accepted by Primer::Beta::Octicon.
NameRequiredDescription
system_arguments
Hash

Same arguments as Primer::Beta::Octicon.