panelui

Range Meter

Component

About

A reading on a ruler of ticks that rises where the value is, with the number above it.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Range Meter to your project and fits it to your theme.

Code

How Range Meter is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

'use client';

import { RangeMeter } from '@/components/ui/panel-range-meter';
/** Three readings nobody can change: without `onValueChange` it is a meter. */
const READINGS = [
  { name: 'Build cache', used: 71, color: 'primary' },
  { name: 'Artifact storage', used: 88, color: 'warning' },
  { name: 'Log retention', used: 34, color: 'info' },
] as const;

export default function RangeMeterReadings() {
  return (
    <div className="flex w-full max-w-sm flex-col gap-5">
      {READINGS.map((reading) => (
        <div key={reading.name} className="flex flex-col">
          <RangeMeter.Label>{reading.name}</RangeMeter.Label>
          <RangeMeter
            value={reading.used}
            color={reading.color}
            formatValue={(value) => `${value}%`}
            label={reading.name}
            valueText={`${reading.used} percent used`}
          />
        </div>
      ))}
    </div>
  );
}

Dependencies

More by panelui

View all
  • Spinner

    Spinner

    7
  • Flow

    Flow

    3
  • Treemap Chart

    Treemap Chart

    1
  • Soundwave

    Soundwave

    1
  • Share

    Share

    1
  • Scatter Chart

    Scatter Chart

    1
  • Pyramid Chart

    Pyramid Chart

    1
  • Model Picker

    Model Picker

    1