Display
Percent Ring Meter
A progress ring with the number inside: the arc is a conic-gradient cut by a mask, so the ring stays a single element without svg or a cover circle.
- spinner
- progress
- ring
- percent
Preview
Use it with AI
- 1. Copy the link.
- 2. Write to your agent in your own words and drop the link into the sentence.
- 3. The agent opens the link and installs the component from the registry.
put this in the header: https://vibeui.ru/c/spinner-004?lang=en
Show the full instructions
What the link says, spelled out. Use it when your agent cannot open links — paste this text instead.
# Install and place "spinner-004" (Percent Ring Meter) from VibeUI
## 1. Install first — do not skip, do not recreate
Run this exact command before writing any code:
npx shadcn@latest add https://vibeui.ru/r/spinner-004.json
Registry item: https://vibeui.ru/r/spinner-004.json
Installs to: components/vibeui/spinner-004.tsx (the exact path follows this project's components.json aliases).
npm dependencies: none.
Registry dependencies: none.
Install it from the registry. Do not recreate it from the description,
do not substitute a similar component from another library, and do not
rewrite it to match the project's existing style.
## 2. What it is
A progress ring with the number inside: the arc is a conic-gradient cut by a mask, so the ring stays a single element without svg or a cover circle.
A percentage progress ring: conic-gradient with a radial mask and a correct progressbar role. Zero dependencies, one file, no client JS.
## 3. How to use it
import { Spinner004 } from "@/components/vibeui/spinner-004"
<Spinner004 value={68} label="Loading components" size="md" />
Read the installed file for the full prop list.
## 4. Where to place it
This is a small inline component. Put it exactly where the user asked,
inside the existing markup. Do not create a new page, section or
wrapper for it. If a similar control already sits in that spot,
replace it instead of adding a second one.
Placement: ___
(The user fills this line in. If it is still blank, ask where to put it
instead of guessing.)
## 5. Keep exactly as installed
- the local --vibeui-spinner-004-* palette — do not swap it for your theme tokens
- the number layered above the ring as its own node: inside the masked element the mask would cut the digits too
- the radial mask instead of a cover circle — a cover gives itself away on anything but a flat background
- the tabular figures: proportional ones change width and make the caption jitter on every update
- aria-valuenow together with valuemin and valuemax: without bounds the value means nothing
- the component's own light surface: number and captions are dark and vanish on a dark background
## 6. You may change
- the share through value from 0 to 100
- the action caption through label
- the ring size through size: sm, md or lg
- the ring thickness through the --vibeui-spinner-004-thickness variable
## 7. Rules
- conic-gradient cannot be transitioned: a smooth fill needs its own animation or JS.
- The value is rounded to an integer — fractions of a percent are unreadable in a ring this size.
- mask is supported by every current browser, but older ones render a solid disc.
- Do not lift the CSS variables into globals.css: the component has to stay a single file.
## 8. Verify
- it renders with no console errors;
- it looks like the preview on the VibeUI page you copied this from;
- if it does not, you changed something listed in section 5 — put it back.For developers
npx shadcn@latest add https://vibeui.ru/r/spinner-004.jsonhttps://vibeui.ru/r/spinner-004.jsonСерверный компонент, хуков нет. Дуга — conic-gradient, из которого радиальная маска вырезает середину: так кольцо остаётся одним элементом, без svg и без второго круга, закрывающего центр. Число лежит поверх кольца отдельным узлом, а не внутри маскированного элемента, иначе маска вырезала бы и цифры. Значение зажимается в 0–100 внутри компонента и объявляется через role=progressbar с aria-valuenow, valuemin и valuemax. Цифры моноширинные: при обычных ширина «11 %» и «88 %» разная, и подпись дёргается на каждом обновлении. Подложка светлая: число и подписи тёмные.
Component source
The same file your agent installs. Here in case you would rather copy it by hand.
import type { ComponentPropsWithoutRef, CSSProperties } from "react"
export type Spinner004Props = Omit<
ComponentPropsWithoutRef<"div">,
"children"
> & {
value?: number
label?: string
size?: "sm" | "md" | "lg"
}
// Идея компонента: кольцо с числом внутри. Дуга нарисована conic-gradient и
// вырезана радиальной маской, поэтому кольцо остаётся одним элементом без
// svg и без второго круга-заглушки в центре. Число набрано моноширинными
// цифрами: при обычных цифрах ширина «11 %» и «88 %» разная, и подпись
// дёргается на каждом обновлении. Значение зажато в 0–100 внутри компонента.
const STYLES = `
:where([data-vibeui-block="spinner-004"]){
--vibeui-spinner-004-size:4.5rem;
--vibeui-spinner-004-thickness:0.5rem;
--vibeui-spinner-004-value:0;
--vibeui-spinner-004-surface:oklch(1 0 0);
--vibeui-spinner-004-border:oklch(0.9 0.006 265);
--vibeui-spinner-004-fg:oklch(0.24 0.014 265);
--vibeui-spinner-004-muted:oklch(0.55 0.014 265);
--vibeui-spinner-004-track:oklch(0.93 0.006 265);
--vibeui-spinner-004-accent:oklch(0.55 0.17 262);
--vibeui-spinner-004-font:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
/* Своя светлая подложка: число и подпись тёмные. */
[data-vibeui-block="spinner-004"]{
display:inline-flex;align-items:center;gap:0.875rem;
box-sizing:border-box;padding:0.875rem 1.125rem 0.875rem 0.875rem;
background:var(--vibeui-spinner-004-surface);
border:1px solid var(--vibeui-spinner-004-border);border-radius:1rem;
font-family:var(--vibeui-spinner-004-font);color:var(--vibeui-spinner-004-fg);
}
[data-vibeui-block="spinner-004"][data-size="sm"]{--vibeui-spinner-004-size:3.25rem;--vibeui-spinner-004-thickness:0.375rem}
[data-vibeui-block="spinner-004"][data-size="lg"]{--vibeui-spinner-004-size:6rem;--vibeui-spinner-004-thickness:0.625rem}
[data-vibeui-block="spinner-004"] [data-part="dial"]{
position:relative;display:grid;place-items:center;flex:none;
width:var(--vibeui-spinner-004-size);height:var(--vibeui-spinner-004-size);
}
/* Дуга — conic-gradient с радиальной маской: одно кольцо без svg и заглушек. */
[data-vibeui-block="spinner-004"] [data-part="ring"]{
position:absolute;inset:0;border-radius:9999px;
background:conic-gradient(
var(--vibeui-spinner-004-accent) calc(var(--vibeui-spinner-004-value) * 1%),
var(--vibeui-spinner-004-track) 0);
mask:radial-gradient(farthest-side,transparent calc(100% - var(--vibeui-spinner-004-thickness)),#000 calc(100% - var(--vibeui-spinner-004-thickness)));
}
/* Число лежит поверх кольца, а не внутри него: маска вырезала бы и цифры. */
[data-vibeui-block="spinner-004"] [data-part="value"]{
position:relative;
font-size:calc(var(--vibeui-spinner-004-size) * 0.24);
font-weight:700;font-variant-numeric:tabular-nums;
}
[data-vibeui-block="spinner-004"] [data-part="text"]{
display:flex;flex-direction:column;gap:0.125rem;min-width:0;
}
[data-vibeui-block="spinner-004"] [data-part="label"]{font-size:0.875rem;font-weight:650}
[data-vibeui-block="spinner-004"] [data-part="hint"]{font-size:0.75rem;color:var(--vibeui-spinner-004-muted)}
@media (prefers-reduced-motion:reduce){[data-vibeui-block="spinner-004"] *{animation:none!important;transition:none!important}}
`
/**
* Кольцо прогресса с процентом внутри на conic-gradient и маске.
* Один файл, ноль зависимостей, собственная палитра.
*/
export function Spinner004({
value = 68,
label = "Загружаем компоненты",
size = "md",
className,
style,
...props
}: Spinner004Props) {
const safe = Math.min(100, Math.max(0, Math.round(value)))
const palette = {
"--vibeui-spinner-004-value": safe,
...style,
} as CSSProperties
return (
<>
<style href="vibeui-spinner-004" precedence="medium">
{STYLES}
</style>
<div
{...props}
data-vibeui-block="spinner-004"
data-size={size}
className={className}
style={palette}
>
<div
data-part="dial"
role="progressbar"
aria-valuenow={safe}
aria-valuemin={0}
aria-valuemax={100}
aria-label={label}
>
<span data-part="ring" aria-hidden="true" />
<span data-part="value" aria-hidden="true">
{safe}%
</span>
</div>
<span data-part="text">
<span data-part="label">{label}</span>
<span data-part="hint">Готово {safe} из 100</span>
</span>
</div>
</>
)
}