Configuration File:
config/promotions/sale-banner.tsOverview
The sale banner appears at the top of your website with a countdown timer for limited-time promotions:- Countdown timer showing days, hours, minutes, seconds
- Customizable offer details and savings
- Call-to-action button
- Shows “Sale Ended” message when expired
config/promotions/sale-banner.ts
Quick Start
1
Set sale end date
Open
config/promotions/sale-banner.ts:2
Customize offer details
Update discount, duration, and savings text
3
Test it
Configuration Structure
Fields Explained
Sale End Date
- Uses UTC timezone (not your local time)
- Format:
"YYYY-MM-DD HH:mm:ss" - Set a past date to hide the banner
- Banner auto-hides when time expires
Offer Details
Subtext
"Auto-applied at checkout • No code needed""For new customers only • Limited slots available""While supplies last • Terms apply"
Call to Action
- Same page section:
"#pricing","#plans" - Another page:
"/games","/vps" - External URL:
"https://checkout.yoursite.com"
Timer Labels
Styling Options
showPulsingDot: Adds attention-grabbing animationshowTimerDividers: Shows:between hours:minutes:seconds
Complete Examples
Black Friday Sale
New Customer Offer
Free Trial Promotion
Removing the Banner
To completely remove the sale banner from your site:1
Open app/page.tsx
Find the homepage file at
app/page.tsx2
Remove the SaleBanner component
Delete the import and the component:
3
Save and test
The banner is now completely removed from your site.
Best Practices
Timing
- Set realistic deadlines - Don’t fake urgency
- Use UTC timezone - Consistent for all users
- Plan ahead - Schedule sales in advance
- Update regularly - Remove expired banners promptly
Offer Copy
- Be specific - “40% OFF” is better than “HUGE DISCOUNT”
- Show value - Include “Save up to $X”
- Clear duration - “First Month”, “3 Months”, “Annually”
- One clear message - Don’t overcomplicate
Call to Action
- Action verbs - “Claim”, “Get”, “Start”, “Shop”
- Urgency - “Claim Now”, “Get Offer”
- Clear destination - Link to pricing or games
- Short text - 2-3 words max
Visibility
- Don’t overuse - Constant sales reduce impact
- Remove when expired - Set past date to hide
- Test on mobile - Ensure text is readable
- Monitor conversions - Track banner click-through rate
Troubleshooting
Banner not showing
Check:- Sale end date is in the future
- Date format is correct:
"YYYY-MM-DD HH:mm:ss" - Time is in UTC, not local timezone
- No syntax errors in config file
Timer shows wrong time
The timer uses UTC. To convert your local time to UTC:- EST/EDT: Add 5 hours (or 4 during DST)
- PST/PDT: Add 8 hours (or 7 during DST)
- GMT: Same as UTC
Banner shows “Sale Ended” message
This is expected behavior! When the sale expires, the banner displays “Sale Ended • Thanks for your interest!” instead of hiding. To completely remove the banner, see Removing the Banner above. To just show the “Sale Ended” message, set a past date:Text too long on mobile
Keep text concise:- Badge: 2-3 words
- Discount: 2-4 words
- Duration: 2-3 words
- CTA: 2-3 words

