Hypebar / Docs
Install Hypebar on any site
Hypebar is one script tag. Build your bar in the builder, copy the snippet, and paste it using the guide for your platform below.
Plain HTML
Paste the snippet just before the closing </body> tag on every page where the bar should appear.
<script async src="https://hypebar.site/widget.js"
data-text="Black Friday: 40% off every plan"
data-code="BF40"
data-ends="2026-11-30T23:59:00.000Z"
data-cta-text="Grab the deal"
data-cta-url="/pricing"
data-theme="blackfriday"></script>
Next.js and React
In the App Router, add it to your root layout with next/script. Data attributes pass straight through.
// app/layout.tsx
import Script from "next/script";
export default function RootLayout({ children }) {
return (
<html lang="en">
<body>
{children}
<Script
src="https://hypebar.site/widget.js"
strategy="afterInteractive"
data-text="Black Friday: 40% off every plan"
data-code="BF40"
data-ends="2026-11-30T23:59:00.000Z"
data-cta-text="Grab the deal"
data-cta-url="/pricing"
/>
</body>
</html>
);
}
For Vite, Create React App, Astro, Remix or SvelteKit, paste the plain HTML snippet into the root HTML template (index.html, app.html or your base layout).
Webflow
- Open Site settings, then Custom code.
- Paste the snippet into Footer code.
- Save and publish. Custom code only runs on the published site, not in the Designer.
Framer
- Open Site settings, then General, and scroll to Custom code.
- Paste the snippet into End of <body> tag.
- Publish. Custom code needs a paid Framer site plan.
WordPress
The simplest route is a header and footer plugin such as WPCode: add a new snippet, paste the code, and set the location to site-wide footer. If you edit themes directly, paste it into footer.php before </body>, ideally in a child theme so updates do not remove it.
Shopify
- Go to Online Store, then Themes, then Edit code.
- Open
layout/theme.liquid. - Paste the snippet just before
</body>and save.
All options
Every option is a data- attribute on the script tag. Only data-text is required.
| Attribute | What it does |
|---|---|
data-text | The message. Required. |
data-code | Coupon code. Visitors click it to copy. |
data-ends | Deadline as an ISO date. Shows the countdown and removes the bar when it passes. |
data-cta-text, data-cta-url | Button label and link. The link must start with /, #, http:// or https://. |
data-theme | midnight (default), snow, blackfriday, sunset, aurora, forest, candy, terminal. |
data-position | top (default), bottom, or inline to render where the tag sits. |
data-dismiss | Set to false to hide the close button. |
data-badge | Set to false to hide the small "Made with Hypebar" link. |
data-analytics | Set to false to stop the widget sending its one anonymous load request (the site's hostname only). Do Not Track is also respected. |
data-starts | ISO date. The bar stays hidden until then, so you can install it before the sale. |
data-bg, data-fg, data-accent | Hex colours for background, text and accent. |
Troubleshooting
The bar does not show up
- Check that
data-endsis in the future. An expired bar never renders. - If you closed the bar earlier, it stays closed in that browser. Try a private window.
- On Webflow and Framer, custom code only runs on the published site.
- If your site has a strict Content Security Policy, allow the Hypebar origin in
script-src.
How do I remove the "Made with Hypebar" link?
Add data-badge="false" to the script tag, or untick it in the builder. It is free either way.
It covers my sticky header
Set data-position="bottom", or use inline and place the script tag where you want the bar.
Ready? Open the builder and you will have a snippet in about a minute.