BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/shadcn-glass-ui/circular-metric-glass

Circular Metric Glass

shadcn-glass-ui/circular-metric-glass
FreeBlock

Compact circular progress metric display optimized for mobile layouts. * Combines CircularProgressGlass with a label for space-efficient metric visualization. * * ## Features

Install it

npx shadcn@latest add https://raw.githubusercontent.com/artyhoo/shadcn-glass-ui-library/main/public/r/circular-metric-glass.json

Source

components/glass/composite/circular-metric-glass.tsxraw.githubusercontent.com/artyhoo/shadcn-glass-ui-library/main/public/r/circular-metric-glass.json
1// ========================================
2// CIRCULAR METRIC GLASS COMPONENT
3// Compact circular metric display for mobile
4// ========================================
5
6import { forwardRef } from 'react';
7import { cn } from '@/lib/utils';
8import {
9 CircularProgressGlass,
10 type CircularProgressGradient,
11} from '../ui/circular-progress-glass';
12import '@/glass-theme.css';
13
14// ========================================
15// TYPES
16// ========================================
17
18export type CircularMetricColor = 'emerald' | 'amber' | 'blue' | 'red';
19
20/**
21 * Props for CircularMetricGlass component.
22 *
23 * Extends standard div attributes for maximum flexibility.
24 * All props are readonly to ensure immutability.
25 *
26 * @example
27 * ```tsx
28 * const props: CircularMetricGlassProps = {
29 * label: 'Reg',
30 * value: 84,
31 * color: 'emerald',
32 * size: 'sm',
33 * };
34 * ```
35 */
36export interface CircularMetricGlassProps extends React.HTMLAttributes<HTMLDivElement> {
37 /**
38 * Metric label displayed below the circular progress indicator.
39 *
40 * Typically a short abbreviation (2-6 characters) for mobile-friendly display.
41 * Examples: "Reg" (Regression), "Imp" (Impact), "Div" (Diversity), "Collab" (Collaboration).
42 */
43 readonly label: string;
44
45 /**
46 * Metric value as a percentage (0-100).
47 *
48 * Controls the circular progress fill amount.
49 * Displayed as percentage text inside the circle.
50 *
51 * @example
52 * ```tsx
53 * <CircularMetricGlass value={84} /> // Shows "84%" at center
54 * ```
55 */
56 readonly value: number;
57
58 /**
59 * Color theme for the metric.
60 *
61 * Maps to semantic color variants:
62 * - `emerald`: Success/positive metrics (--metric-success-*)
63 * - `amber`: Warning/moderate metrics (--metric-warning-*)
64 * - `blue`: Default/neutral metrics (--metric-default-*)
65 * - `red`: Destructive/negative metrics (--metric-destructive-*)
66 *
67 * @default 'blue'
68 */
69 readonly color?: CircularMetricColor;
70
71 /**
72 * Size variant of the circular progress indicator.
73 *
74 * - `sm`: 80px diameter, 6px thickness (mobile-optimized)
75 * - `md`: 112px diameter, 8px thickness (desktop/tablet)
76 *
77 * @default 'sm'
78 */
79 readonly size?: 'sm' | 'md';
80}
81
82// ========================================
83// HELPERS
84// ========================================
85
86// Map CircularMetricColor to CircularProgressGlass gradient and CSS variable
87const colorMap: Record<
88 CircularMetricColor,
89 { gradient: CircularProgressGradient; textVar: string }
90> = {
91// … truncated

Facts

Registry
shadcn-glass-ui
Type
registry:block
Access
Free
Files written
0
Licence
Apache-2.0
First indexed
2026-08-02
Last confirmed
today

Go to the source

yhooi2.github.io artyhoo/shadcn-glass-ui-library on GitHub Raw registry item This item as JSON

More from shadcn-glass-ui

All 76 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Ai Card Glassai-card-glassshadcn-glass-uiBlocksFreeno deps
Career Stats Glasscareer-stats-glassshadcn-glass-uiBlocksFreeno deps
Career Stats Header Glasscareer-stats-header-glassshadcn-glass-uiBlocksFreeno deps
Contribution Metrics Glasscontribution-metrics-glassshadcn-glass-uiBlocksFreeno deps
Flags Section Glassflags-section-glassshadcn-glass-uiBlocksFreeno deps
Header Branding Glassheader-branding-glassshadcn-glass-uiBlocksFreeno deps
Header Nav Glassheader-nav-glassshadcn-glass-uiBlocksFreeno deps
Metric Card Glassmetric-card-glassshadcn-glass-uiBlocksFreeno deps
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex