Meter
blode-ui/meterFreeComponent
A meter that shows a scalar value within a bounded range.
Install it
npx shadcn@latest add https://raw.githubusercontent.com/mblode/blode-ui/main/public/r/meter.jsonSource
1"use client";23import { Meter as MeterPrimitive } from "@base-ui/react/meter";4import type * as React from "react";56import { cn } from "@/lib/utils";78const Meter = ({ className, ...props }: React.ComponentProps<typeof MeterPrimitive.Root>) => (9 <MeterPrimitive.Root10 className={cn("flex w-full flex-col gap-2", className)}11 data-slot="meter"12 {...props}13 />14);1516const MeterLabel = ({ className, ...props }: React.ComponentProps<typeof MeterPrimitive.Label>) => (17 <MeterPrimitive.Label18 className={cn("font-medium text-sm leading-none", className)}19 data-slot="meter-label"20 {...props}21 />22);2324const MeterValue = ({ className, ...props }: React.ComponentProps<typeof MeterPrimitive.Value>) => (25 <MeterPrimitive.Value26 className={cn("text-muted-foreground text-sm tabular-nums", className)}27 data-slot="meter-value"28 {...props}29 />30);3132const MeterTrack = ({ className, ...props }: React.ComponentProps<typeof MeterPrimitive.Track>) => (33 <MeterPrimitive.Track34 className={cn("h-2 w-full overflow-hidden rounded-full bg-primary/20", className)}35 data-slot="meter-track"36 {...props}37 />38);3940const MeterIndicator = ({41 className,42 ...props43}: React.ComponentProps<typeof MeterPrimitive.Indicator>) => (44 <MeterPrimitive.Indicator45 className={cn("h-full bg-primary transition-[width]", className)}46 data-slot="meter-indicator"47 {...props}48 />49);5051export { Meter, MeterIndicator, MeterLabel, MeterTrack, MeterValue };
What it pulls in
npm packages
Files it writes
More from blode/ui
All 85 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | blode/ui | Components | Free | 2 deps | |
| Alertalert | blode/ui | Components | Free | no deps | |
| Alert Dialogalert-dialog | blode/ui | Components | Free | 1 dep | |
| Ask User Questionsask-user-questions | blode/ui | Components | Free | 1 dep | |
| Aspect Ratioaspect-ratio | blode/ui | Components | Free | 1 dep | |
| Attachmentattachment | blode/ui | Components | Free | 1 dep | |
| Autocompleteautocomplete | blode/ui | Components | Free | 1 dep | |
| Avataravatar | blode/ui | Components | Free | 1 dep |
