x
1
2
3
4
<a href="#" data-view-component="true" class="Link"><span data-view-component="true" class="Link-content"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-mark-github"> <path d="M6.766 11.695C4.703 11.437 3.25 9.904 3.25 7.92c0-.806.281-1.677.75-2.258-.203-.532-.172-1.662.062-2.129.626-.081 1.469.258 1.969.726.594-.194 1.219-.291 1.985-.291.765 0 1.39.097 1.953.274.484-.451 1.343-.79 1.969-.709.218.435.25 1.564.046 2.113.5.613.766 1.436.766 2.274 0 1.984-1.453 3.485-3.547 3.759.531.355.891 1.129.891 2.016v1.678c0 .484.39.758.859.564C13.781 14.824 16 11.905 16 8.291 16 3.726 12.406 0 7.984 0 3.562 0 0 3.726 0 8.291c0 3.581 2.203 6.55 5.172 7.663A.595.595 0 0 0 6 15.389v-1.291c-.219.097-.5.162-.75.162-1.031 0-1.641-.581-2.078-1.662-.172-.435-.36-.693-.719-.742-.187-.016-.25-.097-.25-.193 0-.194.313-.339.625-.339.453 0 .844.29 1.25.887.313.468.641.678 1.031.678.391 0 .641-.146 1-.516.266-.275.469-.517.657-.678Z"></path></svg>Link with leading icon</span></a>1
2
3
4
render(Primer::Beta::Link.new(href: "#")) do |component| component.with_leading_visual_icon(icon: :"mark-github") "Link with leading icon"endNo notes provided.
No params configured.
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
72
73
74
75
76
77
78
79
/* 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;}