Insight Card Glass
shadcn-glass-ui/insight-card-glassFreeComponent
Versatile insight display component with emoji icons, text, and optional interactivity. * Supports 7 semantic variants with distinct styling and multiple display modes for dashboards, * analytics, and feedback interfaces. * * ## Features
Install it
npx shadcn@latest add https://raw.githubusercontent.com/artyhoo/shadcn-glass-ui-library/main/public/r/insight-card-glass.jsonSource
1/**2 * InsightCardGlass Component3 *4 * Versatile insight display component with emoji icons, text, and optional interactivity.5 * Supports 7 semantic variants with distinct styling and multiple display modes for dashboards,6 * analytics, and feedback interfaces.7 *8 * ## Features9 * - **7 Semantic Variants:** default, tip, highlight, warning, stat, growth, decline10 * - **2 Display Modes:** card (default) with glass surface, or inline for text integration11 * - **Emoji Icons:** Default emojis per variant (customizable via `emoji` prop)12 * - **Clickable Mode:** Optional `onClick` handler with hover glow effect13 * - **Arrow Indicator:** Optional chevron icon for clickable insights14 * - **Fade-In Animation:** Optional entrance animation via `animated` prop15 * - **Detail Text:** Optional secondary text line for additional context16 * - **Keyboard Accessible:** Space/Enter key support when clickable17 * - **Theme-Aware:** Variant-specific border colors and glow effects18 * - **CVA Variants:** Type-safe variant system with automatic styling19 *20 * ## CSS Variables21 * Defined per variant in `insight-card-glass-variants.ts`:22 *23 * ### Shared Variables24 * - `--glass-bg-subtle` - Card background (non-inline mode)25 * - `--glass-bg` - Hover background for clickable cards26 * - `--text-primary` - Main text color27 * - `--text-secondary` - Inline text color28 * - `--text-muted` - Detail text and arrow icon color29 *30 * ### Variant-Specific Variables31 * Each variant has unique border and glow variables:32 *33 * - **default:** `--glass-border`, `--glow-primary`34 * - **tip:** `--alert-default-border`, `--glow-secondary`35 * - **highlight:** `--alert-success-border`, `--glow-success`36 * - **warning:** `--alert-warning-border`, `--glow-warning`37 * - **stat:** `--glass-border`, no glow38 * - **growth:** `--alert-success-border`, `--glow-success`39 * - **decline:** `--alert-destructive-border`, `--glow-error`40 *41 * @example Basic usage42 * ```tsx43 * import { InsightCardGlass } from 'shadcn-glass-ui'44 *45 * function Dashboard() {46 * return (47 * <InsightCardGlass48 * variant="tip"49 * text="Your code quality has improved this month"50 * detail="Based on 45 merged PRs"51 * />52 * )53 * }54 * ```55 *56 * @example Clickable insight with arrow57 * ```tsx58 * <InsightCardGlass59 * variant="highlight"60 * text="New achievements unlocked!"61 * detail="View all 3 achievements"62 * onClick={() => navigate('/achievements')}63 * showArrow={true}64 * />65 * ```66 *67// … 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 |
