Trust Score Display Glass
shadcn-glass-ui/trust-score-display-glassFreeBlock
Large animated trust score display with gradient text and pulsing animation. * Extracted from TrustScoreCardGlass for reusability across layouts. * * ## Features
Install it
npx shadcn@latest add https://raw.githubusercontent.com/artyhoo/shadcn-glass-ui-library/main/public/r/trust-score-display-glass.jsonSource
1/**2 * TrustScoreDisplayGlass Component3 *4 * Large animated trust score display with gradient text and pulsing animation.5 * Extracted from TrustScoreCardGlass for reusability across layouts.6 *7 * ## Features8 * - Large animated score number with gradient background9 * - 3 size variants (sm, md, lg) with responsive text scales10 * - Optional Target icon with accent color11 * - Score/maxScore ratio format (e.g., "85 / 100")12 * - Customizable title (default: "Overall Trust Score")13 * - Theme-aware text colors (primary, accent, muted)14 * - Pulsing animation (2s cycle, ease-in-out)15 * - Centered horizontal layout with space-between alignment16 *17 * ## CSS Variables18 * Uses theme text color variables (no component-specific variables):19 * - `--text-primary` - Title text color20 * - `--text-accent` - Target icon color21 * - `--text-muted` - Max score text color22 * - `--score-gradient` - Gradient background for score number23 *24 * @example Basic usage25 * ```tsx26 * import { TrustScoreDisplayGlass } from 'shadcn-glass-ui'27 *28 * function TrustDashboard() {29 * return (30 * <TrustScoreDisplayGlass score={85} />31 * )32 * }33 * ```34 *35 * @example With custom title and max score36 * ```tsx37 * <TrustScoreDisplayGlass38 * score={92}39 * maxScore={100}40 * title="Security Score"41 * size="lg"42 * />43 * ```44 *45 * @example Small size without icon46 * ```tsx47 * <TrustScoreDisplayGlass48 * score={78}49 * size="sm"50 * showIcon={false}51 * />52 * ```53 *54 * @example Large size with custom styling55 * ```tsx56 * <TrustScoreDisplayGlass57 * score={95}58 * maxScore={120}59 * title="Performance Score"60 * size="lg"61 * className="mb-6"62 * />63 * ```64 *65 * @accessibility66 * - Score uses `bg-clip-text` with transparent text for gradient effect67 * - High contrast ratio maintained via CSS variable colors68 * - Target icon is decorative (no aria-label needed)69 * - Semantic `<h2>` element for title (adjust as needed for heading hierarchy)70 * - Animation respects system motion preferences when configured71 *72 * @since v1.0.073 */7475import { forwardRef, type HTMLAttributes, type CSSProperties } from 'react';76import { Target } from 'lucide-react';77import { cn } from '@/lib/utils';78import '@/glass-theme.css';7980/**81 * Props for TrustScoreDisplayGlass component.82 *83 * Extends standard div attributes with score display-specific props.84 *85 * @example86 * ```tsx87 * const props: TrustScoreDisplayGlassProps = {88 * score: 85,89 * maxScore: 100,90 * title: 'Overall Trust Score',91 * size: 'lg',92// … truncated
More from shadcn-glass-ui
All 76 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Ai Card Glassai-card-glass | shadcn-glass-ui | Blocks | Free | no deps | |
| Career Stats Glasscareer-stats-glass | shadcn-glass-ui | Blocks | Free | no deps | |
| Career Stats Header Glasscareer-stats-header-glass | shadcn-glass-ui | Blocks | Free | no deps | |
| Circular Metric Glasscircular-metric-glass | shadcn-glass-ui | Blocks | Free | no deps | |
| Contribution Metrics Glasscontribution-metrics-glass | shadcn-glass-ui | Blocks | Free | no deps | |
| Flags Section Glassflags-section-glass | shadcn-glass-ui | Blocks | Free | no deps | |
| Header Branding Glassheader-branding-glass | shadcn-glass-ui | Blocks | Free | no deps | |
| Header Nav Glassheader-nav-glass | shadcn-glass-ui | Blocks | Free | no deps |
