ValyroUI English version

Progress Circle

Круговой прогресс: кольцо плавно доходит до значения или крутится в ожидании. Бесплатно, MIT · Базовые элементы › Загрузка

Установка

npx valyro-cli@latest add progress-circle
npx shadcn@latest add https://valyro.xyz/r/progress-circle.json
npm install valyro-ui

import 'valyro-ui/styles.css';
import { ProgressCircle } from 'valyro-ui';

Пропсы

PropTypeDefault
valuenumberOmit (or pass a non-finite number) for an indeterminate ring.
maxnumber100Value of a full ring; value is clamped to 0…max. A non-positive or non-finite max falls back to 100.
size'sm' | 'md' | 'lg' | number'md'Diameter: sm 24px, md 40px, lg 64px, or a number of pixels.
thicknessnumberRing width in pixels. Default: the theme's share of the diameter (--ui-progress-circle-thickness, 10 %).
color'accent' | 'success' | 'warning' | 'danger' | 'neutral''accent'Ring colour: the theme accent, a status colour, or the foreground (neutral).
labelReactNodeCaption under the ring; also names the progressbar unless aria-label is given.
hideLabelbooleanfalseKeep label as the accessible name only, without showing it.
showValueboolean | ReactNodeText in the centre: true shows the formatted value, a node shows itself (e.g. "3/5"), false nothing. Default: the value on md and larger rings, nothing on sm.
formatValue(value: number, max: number) => stringCustom value text (shown and announced), e.g. "3 of 8 files".
localestringLocale for the percentage (default: the ThemeProvider's, then the browser's).
animation'default' | 'spring''default'spring: the arc springs to each new value and the shown number counts along with it. default: the theme's ease.

Похожие компоненты

  • Skeleton — Заглушки загрузки
  • Spinner — Индикатор загрузки
  • Progress Bar — Полосы прогресса
  • Button — Кнопки всех типов
  • Icon Button — Кнопка с иконкой
  • Color Mode Switch — Светлая, тёмная или системная: выбор сохраняется, применяется до первого кадра, синхронизируется между вкладками и сменяется плавно
  • Button Group — Группы кнопок
  • Copy to Clipboard — Копирование с подтверждением
  • Badge — Статусы и метки
  • Tag — Удаляемые и кликабельные теги, группы с «+N»
  • Avatar — Аватары пользователей
  • Tooltip — Всплывающие подсказки

Назад: Progress Bar · Далее: App Shell · Весь раздел «Базовые элементы»