StealThis .dev

Hotel Loyalty Tier Card

A membership loyalty card widget for Aurelia Hotels — displays member name, current tier (Silver/Gold/Platinum), member number, and points balance on a premium gradient card. Below it a progress bar shows nights and points needed for the next tier, alongside a benefits list and recent points activity. A tier switcher reskins the card and a 'Simulate a stay' button adds points, animates the progress bar, and auto-promotes to the next tier when the threshold is crossed.

Labで開く
html css vanilla-js
ターゲット: JS HTML

コード

Hotel Loyalty Tier Card

A centered widget that showcases the Aurelia Hotels membership programme. The top premium gradient card displays the member’s name, current tier badge, member number, and points balance with tabular numerals. Below it a progress bar fills toward the next-tier threshold, flanked by nights-to-upgrade and points-needed labels. A collapsible tier benefits list and a recent points-activity log complete the widget. Three tier-switcher buttons (Silver / Gold / Platinum) immediately restyle the card gradient and update the benefits. The “Simulate a stay” button awards stay-appropriate points, animates the progress bar with a CSS transition, and automatically promotes the member — with a fanfare toast — when they cross the tier threshold.