# V meter 13

> Basic meter

A shadcn/ui block from the [@cnippet](https://ui.cnippet.dev/) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/cnippet/v-meter-13).

- Page, with a live preview: https://shadcn.exchange/r/cnippet/v-meter-13
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/cnippet/v-meter-13-light-170836b574634cce.png
- Registry item: https://ui.cnippet.dev/r/v-meter-13.json
- Categories: meter
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://ui.cnippet.dev/r/v-meter-13.json
```

Run it in a project that has shadcn/ui set up. It adds the files below and installs what they depend on.

## Dependencies

- Registry items: `@cnippet/meter`

## Files

### `registry/default/variants/v-meter-13.tsx`

```tsx
"use client";

import { DatabaseIcon, FileIcon, ImageIcon } from "lucide-react";
import {
  Meter,
  MeterIndicator,
  MeterLabel,
  MeterTrack,
  MeterValue,
} from "@/registry/default/ui/meter";

const breakdown = [
  { icon: ImageIcon, label: "Photos", total: 10, used: 4.2 },
  { icon: FileIcon, label: "Documents", total: 10, used: 1.8 },
  { icon: DatabaseIcon, label: "Backups", total: 10, used: 7.5 },
];

export function Pattern() {
  return (
    <div className="w-full max-w-sm space-y-4">
      {breakdown.map(({ icon: Icon, label, used, total }) => (
        <Meter key={label} max={total} value={used}>
          <div className="flex items-center justify-between gap-2">
            <MeterLabel className="flex items-center gap-1.5">
              <Icon
                aria-hidden="true"
                className="size-3.5 text-muted-foreground"
              />
              {label}
            </MeterLabel>
            <MeterValue>{() => `${used} / ${total} GB`}</MeterValue>
          </div>
          <MeterTrack>
            <MeterIndicator />
          </MeterTrack>
        </Meter>
      ))}
    </div>
  );
}
```
