Componentcharts0.67 KB gzipZero dependencies

Gauge

Half-donut SVG gauge with needle animation and value readout

Preview

Live Preview
Open ↗

Installation

Tokens guide →

Add to your project via CLI (zero dependencies, code you own):

npx bigbullui add gauge

Or install the full npm package:

npm install bigbullui

Usage

tsx3 lines
import { Gauge } from "@/components/ui/gauge"; <Gauge value={75} min={0} max={100} label="Progress" />

Source code

gauge.tsx + 1 helper

Zero third-party dependencies (2 local files shown in tabs below).

tsxgauge.tsx101 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface GaugeProps extends React.HTMLAttributes<HTMLDivElement> {  value: number;  min?: number;  max?: number;  label?: string;} export function Gauge({  value,  min = 0,  max = 100,  label,  className,

Props

Interactive Prop Playground

Tweak parsed AST props below to generate ready-to-paste JSX.

tsx3 lines
import { Gauge } from "@/components/ui/gauge"; <Gauge />
PropTypeDescription
valuenumberControlled value.
minnumberMinimum allowed numeric or date bound. (Default: 0)
maxnumberMaximum allowed numeric or date bound. (Default: 100)
labelstringAccessible label text rendered or attached to the control.