Circular progress indicator #6061
Replies: 3 comments 3 replies
-
Screenshot of the mockup: |
Beta Was this translation helpful? Give feedback.
-
The example code is all in .progres-pie; the rest is how it'd work when enclosed with wrappers (which would be elements in your PatternFly UI, such as a button, toolbar, and so on). .progress-pie {
--progress-fill: #333;
--progress-empty: #ccc;
/* Width can be set to 100% for a filled circle or to any units, including px */
--progress-width: 40%;
/* Size from the edge, add a px for antialiasing */
--mask-image: radial-gradient(
circle farthest-side,
transparent calc(100% - var(--progress-width)),
black calc(100% - var(--progress-width) + 1px)
);
aspect-ratio: 1 / 1;
border-radius: 100%;
display: inline-block;
height: 100%;
min-height: 16px;
/* Multiply by a float for a bit of anti-aliasing, while preserving 0% and 100% */
background: conic-gradient(
var(--progress-fill) var(--progress, 0),
var(--progress-empty) calc(var(--progress, 0) * 1.005)
);
mask-image: var(--mask-image);
-webkit-mask-image: var(--mask-image);
} This would be adjusted to for PatternFly naming conventions and so on. |
Beta Was this translation helpful? Give feedback.
-
Also: Apologies for developing it on the development version of Chrome (instead of stable) and not realizing that Chrome has been lagging behind both Firefox and Safari (yet again). Anway, it's now fixed with the duplication with a prefixed |
Beta Was this translation helpful? Give feedback.
-
@garrett proposes a circular progress indicator - details below. What other products would have a use case for this?
Beta Was this translation helpful? Give feedback.
All reactions