1
2
3
4
render(Primer::Beta::Link.new(href: "#", id: "tooltip-link", scheme: scheme, muted: muted, underline: underline)) do |component| component.with_tooltip(text: "Tooltip text") "Link with tooltip"end
<span data-view-component="true" class="position-relative"><a id="tooltip-link" href="#" data-view-component="true" class="Link Link--underline">Link with tooltip</a> <tool-tip id="tooltip-6b3cbde2-7197-4ec8-8e41-dfdc00602515" for="tooltip-link" popover="manual" data-direction="s" data-type="description" data-view-component="true" class="sr-only position-absolute">Tooltip text</tool-tip></span>
render(Primer::Beta::Link.new(href: "#", id: "tooltip-link", scheme: scheme, muted: muted, underline: underline)) do |component| component.with_tooltip(text: "Tooltip text") "Link with tooltip"end
No notes provided.
Param | Description | Input |
---|---|---|
— |
|
|
— |
|
|
— |
|
/* Links */.Link { color: var(--fgColor-accent); -webkit-text-decoration: none; text-decoration: none;}.Link:hover { -webkit-text-decoration: underline; text-decoration: underline; cursor: pointer; }.Link:focus { -webkit-text-decoration: underline; text-decoration: underline; }.Link:focus,.Link:focus-visible { outline-offset: 0; }.Link--underline { -webkit-text-decoration: underline; text-decoration: underline;}.Link--primary { color: var(--fgColor-default) !important;}.Link--primary:hover { color: var(--fgColor-accent) !important; }.Link--secondary { color: var(--fgColor-muted) !important;}.Link--secondary:hover { color: var(--fgColor-accent) !important; }.Link--muted { color: var(--fgColor-muted) !important;}.Link--muted:hover { color: var(--fgColor-accent) !important; -webkit-text-decoration: none; text-decoration: none; }/* Set the link color only on hover Useful when you want only part of a link to turn blue on hover */.Link--onHover:hover { color: var(--fgColor-accent) !important; -webkit-text-decoration: underline; text-decoration: underline; cursor: pointer; }/* When using a color utility class inside of a link class color should change with link on hover. */:is(.Link--secondary,.Link--primary,.Link--muted):hover [class*='color-fg'] { color: inherit !important; }.Link-content { display: inline-flex; align-items: center; /* stylelint-disable-next-line primer/typography */ line-height: normal; gap: var(--base-size-4); text-decoration: inherit;}
<lookbook-embed app="https://primer-lookbook.github.com/view-components/lookbook/" preview="Primer::Beta::LinkPreview" scenario="tooltip"></lookbook-embed>