ValyroUI Русская версия

Proportion Bar

Proportion bar with a legend: storage, budget, breakdown. Pro · Data and metrics › Metrics and widgets

Installation

npx valyro-cli@latest login
npx valyro-cli@latest add proportion-bar
npm install valyro-ui-pro

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

Props

PropTypeDefault
segments *ProportionSegment[]The parts, drawn left to right; zero or negative values take no space.
totalnumberCapacity of the bar (100 GB of storage): the rest stays as empty track. Default: the sum of the segments.
size'sm' | 'md' | 'lg''md'Bar thickness. Default md.
showLegendbooleantrueDots with names under the bar. Default true.
showValuesbooleanfalseAdds each segment's formatted value to the legend.
valueFormatter(value: number) => stringFormats values in the legend and the accessible summary.
ariaLabelstringAccessible name of the bar (the summary of the segments follows it).
legendEndReactNodeContent at the end of the legend row: "61.8 GB available".
localestringBCP 47 locale for the default number format.

Related components

  • Stats Card — Metric cards
  • KPI Group — KPI row: value, change vs. previous period, sparkline and progress to goal
  • Widget — Dashboard container: title, actions, big number, legend and chart area
  • Number Value — Locale-aware number: currency, percent, compact notation and units
  • Trend Value — Metric change: arrow, sign and color, as text or a pill
  • Activity Rings — Concentric progress rings toward goals
  • Leaderboard — Leaderboard: medal places, thumbnails, numbers and change over a period
  • Data Table — Tables with search and sorting
  • Data Grid — Grid for 100,000 rows: grouping, filters, inline editing
  • Virtual List — Virtual list for 100,000 rows
  • Bulk Action Bar — Actions for selected rows, with keyboard shortcuts
  • List Block — List with images or icons, descriptions and values

Previous: Trend Value · Next: Activity Rings · All Data and metrics