Progress Glass
shadcn-glass-ui/progress-glassFreeComponent
Glass-themed progress bar with 100% shadcn/ui Progress API compatibility. * * ## shadcn/ui Compatibility * * This component is **fully compatible** with shadcn/ui Progress API:
Install it
npx shadcn@latest add https://raw.githubusercontent.com/artyhoo/shadcn-glass-ui-library/main/public/r/progress-glass.jsonSource
1/**2 * ProgressGlass Component3 *4 * Glass-themed progress bar with 100% shadcn/ui Progress API compatibility.5 *6 * ## shadcn/ui Compatibility7 *8 * This component is **fully compatible** with shadcn/ui Progress API:9 * - `value` prop works identically10 * - `max` prop supported (default: 100)11 * - Extra props (`size`, `gradient`, `showLabel`) have sensible defaults12 * - Drop-in replacement: `<Progress value={50} />` → `<ProgressGlass value={50} />`13 *14 * @example Drop-in replacement from shadcn/ui15 * ```tsx16 * // shadcn/ui17 * <Progress value={50} />18 * <Progress value={50} max={200} />19 *20 * // ProgressGlass (identical behavior)21 * <ProgressGlass value={50} />22 * <ProgressGlass value={50} max={200} />23 * ```24 *25 * @example Enhanced features (not in shadcn/ui)26 * ```tsx27 * <ProgressGlass28 * value={75}29 * max={100} // Custom max value (default: 100)30 * size="lg" // 'sm' | 'md' | 'lg' | 'xl' (default: 'md')31 * gradient="emerald" // 'violet' | 'blue' | 'cyan' | 'amber' | 'emerald' | 'rose' (default: 'violet')32 * showLabel // Show percentage label (default: false)33 * />34 * ```35 *36 * ## Features37 * - Theme-aware styling (glass/light/aurora)38 * - Gradient fill with glow effects39 * - Responsive size variants40 * - Optional percentage label41 *42 * @accessibility43 * - role="progressbar" with aria-valuenow, aria-valuemin, aria-valuemax44 */4546import { forwardRef, type CSSProperties } from 'react';47import { type VariantProps } from 'class-variance-authority';48import { cn } from '@/lib/utils';49import { progressSizes, type ProgressGradient } from '@/lib/variants/progress-glass-variants';50import '@/glass-theme.css';5152// ========================================53// PROPS INTERFACE54// ========================================5556export interface ProgressGlassProps57 extends Omit<React.HTMLAttributes<HTMLDivElement>, 'style'>, VariantProps<typeof progressSizes> {58 readonly value: number;59 readonly max?: number;60 readonly gradient?: ProgressGradient;61 readonly showLabel?: boolean;62}6364// ========================================65// COMPONENT66// ========================================6768// Map gradient to existing metric color variables69const getGradientColor = (70 gradient: ProgressGradient = 'violet'71): { colorVar: string; glowVar: string } => {72 const gradients: Record<ProgressGradient, { colorVar: string; glowVar: string }> = {73// … truncated
More from shadcn-glass-ui
All 76 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Alert Glassalert-glass | shadcn-glass-ui | Components | Free | no deps | |
| Animated Background Glassanimated-background-glass | shadcn-glass-ui | Components | Free | no deps | |
| Avatar Glassavatar-glass | shadcn-glass-ui | Components | Free | no deps | |
| Badge Glassbadge-glass | shadcn-glass-ui | Components | Free | no deps | |
| Base Progress Glassbase-progress-glass | shadcn-glass-ui | Components | Free | no deps | |
| Button Glassbutton-glass | shadcn-glass-ui | Components | Free | no deps | |
| Card Glasscard-glass | shadcn-glass-ui | Components | Free | no deps | |
| Checkbox Glasscheckbox-glass | shadcn-glass-ui | Components | Free | no deps |
