HomeDocsComponentsBlocksChartsThemes
Introduction
  • Introduction
  • Installation
  • Themes
  • llms.txt
Components
  • Accordion
  • Alert
  • Alert Dialog
  • Amount
  • Aspect Ratio
  • Audio Player
  • Avatar
  • Avatar Upload
  • Badge
  • Banner
  • Breadcrumb
  • Button
  • Button Group
  • Calendar
  • Card
  • Carousel
  • Chart
  • Checkbox
  • Code Block
  • Collapsible
  • Color Picker
  • Combobox
  • Command
  • Context Menu
  • Copy Button
  • Countdown
  • Data Grid
  • Data Table
  • Date Picker
  • Date Range Picker
  • Description List
  • Device Mockup
  • Dialog
  • Direction
  • Dot Loader
  • Drawer
  • Dropdown Menu
  • Empty
  • Field
  • File Upload
  • Hover Card
  • Input
  • Input Group
  • Input OTP
  • Item
  • Kanban
  • Kbd
  • Label
  • Meter
  • Multi Select
  • Native Select
  • Number Field
  • Pagination
  • Password Strength
  • Phone Input
  • Popover
  • Progress
  • Progress Circle
  • Radio Group
  • Rating
  • Resizable
  • Responsive Dialog
  • Rich Text Editor
  • Scroll Area
  • Segmented Control
  • Select
  • Separator
  • Sheet
  • Sidebar
  • Signature
  • Skeleton
  • Slider
  • Sonner
  • Sortable
  • Spinner
  • Stat
  • Stepper
  • Switch
  • Table
  • Tabs
  • Tag Input
  • Terminal
  • Textarea
  • Time Field
  • Timeline
  • Toast
  • Toggle
  • Toggle Group
  • Tooltip
  • Tree
  • Typography
  • Video Player
  • Window Mockup
AI
  • Message Scroller
  • Message
  • Bubble
  • Marker
  • Attachment
  • Questionnaire
  • Composer
  • Reasoning
  • Tool Call
  • Approval Card
  • Citations
Blocks
  • Airtable
  • Airtable Kanban
  • ClickUp List
  • ClickUp Kanban
  • Repeatable Group
  • Command Palette
  • Sign In and Sign Up
  • Availability Scheduler
  • AI Chat
  • Action Bar
  • Notion
  • Banking
  • Lineup Builder
  • Sports Score
  • Strava
  • Sheets
  • Notices
  • Settings
  • Billing
Utilities
  • motion
  • sounds
  • scroll-fade
  • shimmer
Another UI. Built on shadcn/ui with Phosphor icons.

Meter

PreviousNext

A value inside a known range, like budget spent or storage used, colored by thresholds. Comes as a single bar, segments, or a stack of parts with a legend.

Base UIReact AriaRadix UI
Software budget, October$3,180 of $4,000

Most of this month is spent.

Storage87.1 GB of 100 GB
  • Receipts38.4 GB
  • Contracts21.2 GB
  • Design files17.9 GB
  • Backups9.6 GB

Fair

AI credits120 left

Credits run out in about 2 days at this rate.

Installation#

pnpm dlx shadcn@latest add https://anotherui.dev/r/meter.json

Usage#

import { Meter, MeterStack } from "@/components/ui/meter"
<Meter
  label="Software budget"
  value={3180}
  max={4000}
  formatOptions={{ style: "currency", currency: "CAD" }}
  thresholds={{ low: 3000, high: 3800, optimum: 0 }}
/>
 
<MeterStack
  label="Storage"
  max={100}
  parts={[
    { label: "Receipts", value: 38.4 },
    { label: "Contracts", value: 21.2 },
  ]}
/>

Meter or Progress#

Use Meter for an amount that sits in a range and can go up or down, like credits left. Use Progress for a task moving toward done, like an upload.

Thresholds#

Thresholds work like the HTML meter. low and high split the range into three regions, and optimum says which region is good.

  • The region holding optimum is ok and uses the primary color.
  • The region next to it is a warning and turns amber.
  • The far region is danger and turns red.

For a budget, less is better, so set optimum: 0. For credits left, more is better, so set optimum to the max. Pass tone to set the color yourself.

Props#

  • Meter. value, min and max. label and description sit above and below the bar. formatOptions takes any Intl.NumberFormat options, and valueLabel replaces the formatted value. segments splits the bar into equal parts, and hideHeader keeps only the bar.
  • MeterStack. parts is a list of labels and values, drawn in one track with a legend. max defaults to the total of the parts. Each part takes a className for its color, and the defaults run through the chart colors.

The fill grows from zero on first paint and eases between values on the motion scale. It stays still when reduced motion is on.

Message ScrollerMulti Select

On This Page

InstallationUsageMeter or ProgressThresholdsProps