Partition Bar

A horizontal proportional bar chart for visualizing part-to-whole relationships.

  • System
    50GB
  • Apps
    30GB
  • Free
    20GB

Installation

npx shadcn-vue@latest add https://raya-ui.com/registry/partition-bar.json

Or manually:

npm install clsx tailwind-merge class-variance-authority

Examples

Variants

Use variant props to apply standard theme colors.

  • Errors
  • Success
  • Pending

Alignment & Sizes

Control label placement with alignment and spacing with size.

  • Left Aligned
    60%
  • Right Aligned
    40%

Props

PartitionBar

PropTypeDefaultDescription
gapnumber1Space between segments (multiplied by 4px).
size'sm' | 'md' | 'lg''md'Height of the bar segments.
classstring-Custom class for the wrapper list.

PartitionBarSegment

PropTypeDefaultDescription
numnumber0Value relative to the sum of all segments.
variantstring'default'Theme color (default, secondary, destructive, outline, muted).
alignment'left' | 'center' | 'right''center'Horizontal alignment of the content under the bar.
classstring-Custom class for the segment wrapper.

Source content adapted from 8 Star labs.