x
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<!-- Default -->
<div class="badge">Badge</div>
<!-- Primary -->
<div class="badge badge--primary">Badge</div>
<!-- Secondary -->
<div class="badge badge--secondary">Badge</div>
<!-- Positive -->
<div class="badge badge--positive">Badge</div>
<!-- Negative -->
<div class="badge badge--negative">Badge</div>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<%# Default %>
<div class="badge">Badge</div>
<%# Primary %>
<div class="badge badge--primary">Badge</div>
<%# Secondary %>
<div class="badge badge--secondary">Badge</div>
<%# Positive %>
<div class="badge badge--positive">Badge</div>
<%# Negative %>
<div class="badge badge--negative">Badge</div>
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
.badge {
background-color: var(--badge-background, var(--color-bg));
border-radius: var(--rounded-full);
border: 1px solid var(--badge-border-color, var(--color-border));
color: var(--badge-color, var(--color-text));
display: inline-flex;
font-size: var(--text-xs);
font-weight: var(--font-semibold);
padding: var(--size-0_5) var(--size-2_5);
}
.badge--primary {
--badge-background: var(--color-primary);
--badge-border-color: transparent;
--badge-color: var(--color-text-reversed);
}
.badge--secondary {
--badge-background: var(--color-secondary);
--badge-border-color: transparent;
--badge-color: var(--color-text);
}
.badge--positive {
--badge-background: var(--color-positive);
--badge-border-color: transparent;
--badge-color: white;
}
.badge--negative {
--badge-background: var(--color-negative);
--badge-border-color: transparent;
--badge-color: white;
}
Java Script is not required or multiple files are needed, check the notes.