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/avatar-glass

Avatar Glass

shadcn-glass-ui/avatar-glass
FreeComponent

Glass-themed avatar with:

Install it

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

Source

components/glass/ui/avatar-glass.tsxraw.githubusercontent.com/artyhoo/shadcn-glass-ui-library/main/public/r/avatar-glass.json · first 6 KB
1/**
2 * AvatarGlass Component
3 *
4 * Glass-themed avatar with:
5 * - Theme-aware styling (glass/light/aurora)
6 * - Glow effect on hover
7 * - Optional glow-pulse animation
8 * - Status indicator with glow
9 * - Size variants
10 * - Built on Radix UI primitives
11 *
12 * @example Compound API (recommended)
13 * ```tsx
14 * <AvatarGlass size="default">
15 * <AvatarGlassImage src="/avatar.jpg" alt="User" />
16 * <AvatarGlassFallback>JD</AvatarGlassFallback>
17 * </AvatarGlass>
18 * ```
19 *
20 * @example With status indicator
21 * ```tsx
22 * <AvatarGlass size="lg" status="online">
23 * <AvatarGlassImage src="/avatar.jpg" alt="User" />
24 * <AvatarGlassFallback>JD</AvatarGlassFallback>
25 * </AvatarGlass>
26 * ```
27 *
28 * @example With glow animation
29 * ```tsx
30 * <AvatarGlass size="xl" glowing>
31 * <AvatarGlassImage src="/avatar.jpg" alt="User" />
32 * <AvatarGlassFallback>JD</AvatarGlassFallback>
33 * </AvatarGlass>
34 * ```
35 */
36
37'use client';
38
39import * as React from 'react';
40import * as AvatarPrimitive from '@radix-ui/react-avatar';
41import { cn } from '@/lib/utils';
42import { useHover } from '@/lib/hooks/use-hover';
43import { avatarSizes, statusSizes } from '@/lib/variants/avatar-glass-variants';
44import '@/glass-theme.css';
45
46// ========================================
47// TYPES
48// ========================================
49
50export type AvatarStatus = 'online' | 'offline' | 'busy' | 'away';
51export type AvatarSize = 'sm' | 'md' | 'lg' | 'xl';
52
53// ========================================
54// HELPERS
55// ========================================
56
57const getStatusVars = (statusType: AvatarStatus): { bg: string; glow: string } => {
58 const statusVars: Record<AvatarStatus, { bg: string; glow: string }> = {
59 online: { bg: 'var(--status-online)', glow: 'var(--status-online-glow)' },
60 offline: { bg: 'var(--status-offline)', glow: 'none' },
61 busy: { bg: 'var(--status-busy)', glow: 'var(--status-busy-glow)' },
62 away: { bg: 'var(--status-away)', glow: 'var(--status-away-glow)' },
63 };
64 return statusVars[statusType];
65};
66
67// ========================================
68// CONTEXT
69// ========================================
70
71interface AvatarGlassContextValue {
72 size: AvatarSize;
73 status?: AvatarStatus;
74 glowing?: boolean;
75}
76
77const AvatarGlassContext = React.createContext<AvatarGlassContextValue>({
78 size: 'md',
79});
80
81// ========================================
82// COMPOUND COMPONENT: ROOT
83// ========================================
84
85// … truncated

Facts

Registry
shadcn-glass-ui
Type
registry:ui
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
Alert Glassalert-glassshadcn-glass-uiComponentsFreeno deps
Animated Background Glassanimated-background-glassshadcn-glass-uiComponentsFreeno deps
Badge Glassbadge-glassshadcn-glass-uiComponentsFreeno deps
Base Progress Glassbase-progress-glassshadcn-glass-uiComponentsFreeno deps
Button Glassbutton-glassshadcn-glass-uiComponentsFreeno deps
Card Glasscard-glassshadcn-glass-uiComponentsFreeno deps
Checkbox Glasscheckbox-glassshadcn-glass-uiComponentsFreeno deps
Circular Progress Glasscircular-progress-glassshadcn-glass-uiComponentsFreeno 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