GitHub

Loyalty Card

Cards for loyalty programs, membership tiers, and rewards. Features gradient backgrounds, a shine effect on hover, tier color variants, progress bars, and multiple layout options.

Basic Loyalty Card

Preview
Bronze
Available Points
2,450pts

Tier Variants

Preview
Bronze
Points
1,200
Silver
Points
3,500
Gold
Points
8,750
Platinum
Points
15,200
Diamond
Points
32,000
VIP
Points
50,000
Member
Points
5,000

With Progress Bar

Preview
Gold
Available Points
8,750pts
8,750 / 12,500 pts Platinum

Compact Variant

Preview
Silver
Points
3,500pts
Maria Lopez
VIP
Points
50,000pts
Carlos Reyes

Horizontal Variant

Preview
Diamond
Available Points
32,000pts

Glass Variant

Preview
Member
Available Points
5,200pts
5,200 / 10,000 pts Silver

Classes Reference

Class Description
.loyalty-cardBase card container. Bronze gradient by default, white text, min-height 180px, shine effect on hover.
.loyalty-card-headerTop area with logo and tier badge. Flexbox with space-between alignment.
.loyalty-card-logoLogo image or text. Max 80px wide, 32px tall.
.loyalty-card-tierTier badge pill. Uppercase, small text, semi-transparent white background.
.loyalty-card-bodyMain content area for points display. Pushed to bottom via mt-auto.
.loyalty-card-points-labelSmall uppercase label above the points value.
.loyalty-card-pointsLarge bold points number (2rem).
.loyalty-card-points-suffixSmaller text after points (e.g., "pts"). Normal weight, reduced opacity.
.loyalty-card-footerBottom area with member info and expiry. Flexbox with space-between.
.loyalty-card-memberMember info wrapper.
.loyalty-card-member-nameMember name. Semibold.
.loyalty-card-member-idMember ID. Monospace, small, reduced opacity.
.loyalty-card-expiryExpiry info wrapper. Right-aligned.
.loyalty-card-expiry-labelExpiry label text (e.g., "Valid thru"). Reduced opacity.
.loyalty-card-expiry-dateExpiry date value. Semibold.
.loyalty-card-progressProgress section wrapper for next-tier tracking.
.loyalty-card-progress-barProgress bar track. 6px height, semi-transparent white background.
.loyalty-card-progress-fillProgress bar fill. Set width via inline style (e.g., style="width: 70%").
.loyalty-card-progress-textText below progress bar. Flex with space-between for current/target labels.
.loyalty-card-qrQR code area. Positioned absolute at bottom-right, 60px square, white background.
Tier Variants
.loyalty-card-bronzeBronze gradient (#cd7f32 to #b87333). White text. This is the default.
.loyalty-card-silverSilver gradient (#c0c0c0 to #a8a8a8). Dark text (#333).
.loyalty-card-goldGold gradient (#ffd700 to #daa520). Dark text (#333).
.loyalty-card-platinumPlatinum gradient (#e5e4e2 to #c4c3c0). Dark text (#333).
.loyalty-card-diamondDiamond gradient (#b9f2ff to #89cff0). Dark blue text (#1e3a5f).
.loyalty-card-vipVIP gradient (#1a1a2e to #16213e). Gold text (#ffd700).
.loyalty-card-primaryUses the theme's --color-primary variable. White text.
Layout Variants
.loyalty-card-compactCompact single-row layout. Reduced padding (1rem), smaller points (1.5rem), no min-height.
.loyalty-card-horizontalHorizontal layout with header, body, and footer side by side. Stacks on mobile.
.loyalty-card.glassGlass morphism variant. Removes gradient/shine, uses backdrop-blur, inherits base content color. Progress fill uses --color-primary.