x
1
<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-98236d4a-3c8b-41aa-8424-723817677908" 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>
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
No notes provided.
Param | Description | Input |
---|---|---|
— |
|
|
— |
|
|
— |
|
app/components/primer/beta/link.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/* Links */.Link { color: var(--fgColor-accent,var(--color-accent-fg)); -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,var(--color-fg-default)) !important;}.Link--primary:hover { color: var(--fgColor-accent,var(--color-accent-fg)) !important; }.Link--secondary { color: var(--fgColor-muted,var(--color-fg-muted)) !important;}.Link--secondary:hover { color: var(--fgColor-accent,var(--color-accent-fg)) !important; }.Link--muted { color: var(--fgColor-muted,var(--color-fg-muted)) !important;}.Link--muted:hover { color: var(--fgColor-accent,var(--color-accent-fg)) !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,var(--color-accent-fg)) !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. */.Link--secondary:hover [class*='color-fg'], .Link--primary:hover [class*='color-fg'], .Link--muted:hover [class*='color-fg'] { color: inherit !important; }