Previews

No matching results.

x
1
2
3
4
5
<span data-view-component="true" class="Progress">
<span style="width: 10%;" data-view-component="true" class="Progress-item color-bg-success-emphasis"></span>
<span style="width: 20%;" data-view-component="true" class="Progress-item color-bg-accent-emphasis"></span>
<span style="width: 30%;" data-view-component="true" class="Progress-item color-bg-danger-emphasis"></span>
</span>
1
2
3
4
5
render(Primer::Beta::ProgressBar.new(size: size)) do |component|
component.with_item(percentage: 10)
component.with_item(bg: :accent_emphasis, percentage: 20)
component.with_item(bg: :danger_emphasis, percentage: 30)
end
Param Description Input

app/components/primer/beta/progress_bar.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
/* Progress */
.Progress {
display: flex;
height: 8px;
overflow: hidden;
background-color: var(--bgColor-neutral-muted,var(--color-neutral-subtle));
border-radius: 6px;
outline: 1px solid transparent; /* Support Firefox custom colors */
}
.Progress--large {
height: 10px;
}
.Progress--small {
height: 5px;
}
.Progress-item {
outline: 2px solid transparent; /* Support Firefox custom colors */
}
.Progress-item + .Progress-item {
margin-left: 2px;
}