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/year-card-glass

Year Card Glass

shadcn-glass-ui/year-card-glass
FreeBlock

@deprecated This prop is no longer used. Sparkline is now only shown in expanded view.

Install it

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

Source

components/glass/composite/year-card-glass.tsxraw.githubusercontent.com/artyhoo/shadcn-glass-ui-library/main/public/r/year-card-glass.json · first 6 KB
1/* eslint-disable react-refresh/only-export-components */
2// ========================================
3// YEAR CARD GLASS COMPONENT
4// Year card with compound API for career timeline
5// Issue #15: shadcn/ui compatible compound component
6// ========================================
7
8import { forwardRef, type CSSProperties, type ReactNode, useMemo } from 'react';
9import { ChevronDown, ChevronUp } from 'lucide-react';
10import { cn } from '@/lib/utils';
11import { BadgeGlass } from '../../ui/badge-glass';
12import { ProgressGlass } from '../../specialized/progress-glass';
13import { SparklineGlass } from '../../specialized/sparkline-glass';
14import { ButtonGlass } from '../../ui/button-glass';
15import { InteractiveCard } from '../../primitives';
16import { InsightCardGlass } from '../../atomic/insight-card-glass';
17import { YearCardContext, useYearCard, type YearCardContextValue } from './year-card-context';
18import type { ProgressGradient } from '@/lib/variants/progress-glass-variants';
19import '@/glass-theme.css';
20
21// ========================================
22// TYPES
23// ========================================
24
25export interface YearCardGlassInsight {
26 readonly variant?: 'default' | 'tip' | 'highlight' | 'warning' | 'stat' | 'growth' | 'decline';
27 readonly emoji?: string;
28 readonly text: string;
29 readonly detail?: string;
30}
31
32export interface YearCardGlassStat {
33 readonly label: string;
34 readonly value: string | number;
35 readonly icon?: ReactNode;
36}
37
38/** Props for YearCardGlass.Root */
39export interface YearCardRootProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect'> {
40 /** Whether the card is selected */
41 isSelected?: boolean;
42 /** Whether the card is expanded */
43 isExpanded?: boolean;
44 /** Callback when selection is triggered */
45 onSelect?: () => void;
46 /** Callback when expanded state changes */
47 onExpandedChange?: (expanded: boolean) => void;
48 children: ReactNode;
49}
50
51/** Props for YearCardGlass.Header */
52export interface YearCardHeaderProps extends React.HTMLAttributes<HTMLDivElement> {
53 children: ReactNode;
54}
55
56/** Props for YearCardGlass.Year */
57export interface YearCardYearProps extends React.HTMLAttributes<HTMLSpanElement> {
58 children: ReactNode;
59}
60
61/** Props for YearCardGlass.Badge */
62export interface YearCardBadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
63 emoji?: string;
64 label: string;
65}
66
67/** Props for YearCardGlass.Value */
68export interface YearCardValueProps extends React.HTMLAttributes<HTMLSpanElement> {
69// … 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
Circular Metric Glasscircular-metric-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
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