Cookie banners are the first thing many visitors see on a website, and a good one balances legal compliance with a smooth user experience. Whether you are designing a new site or updating an existing one, these examples show how to present choices clearly, keep the layout simple, and respect the visitor’s decision. You will find patterns for consent, rejection, and customization that work across different industries and page styles.
What a Cookie Banner Must Always Include
Every cookie banner needs three core elements: a short explanation of what cookies do, a link to the full privacy or cookie policy, and buttons for accepting and rejecting non-essential cookies. The explanation should be one or two sentences, not a paragraph. The policy link must be easy to find, usually in the banner text or as a separate link. The accept and reject buttons should be equally visible; hiding the reject option is a common dark pattern that can lead to fines under GDPR and similar laws.
Also include a “Cookie Settings” or “Customize” button that opens a panel for choosing specific cookie categories. This is not just good practice—it is required by many regulations, including the EU ePrivacy Directive and the UK PECR. The settings panel should list categories like Essential, Analytics, and Marketing, with toggles for each. Essential cookies cannot be turned off, but the toggles for other categories should work immediately without requiring a page reload.
Place the banner in a fixed position—top, bottom, or center—but make sure it does not block the main content on mobile. The banner should appear on the first visit and not reappear until the consent expires or is withdrawn. Most sites set consent to last 6 to 12 months, but you can choose a shorter or longer period as long as you state it in the policy.
Consent and Reject Buttons That Are Honest and Clear
The most straightforward banner shows two buttons: “Accept All” and “Reject All.” Both buttons should be the same size and color contrast, so the visitor does not feel pressured. For example, a banner might say: “We use cookies to improve your experience and analyze traffic. You can accept all, reject non-essential, or customize.” Then two buttons: “Accept All” and “Reject All.” This pattern is common on news sites and e-commerce stores because it is fast and unambiguous.
A variation adds a third option: “Customize.” This is useful when your site uses many third-party cookies, such as advertising pixels or social media embeds. The customize button opens a panel where the visitor can toggle categories on or off. A good example: “We use cookies to personalize content and ads. Choose your preferences.” Buttons: “Accept All,” “Reject All,” “Customize.” The customize panel lists each category with a short description and a toggle.
Another pattern is the “Learn more” link placed next to the text, which leads to the full cookie policy. This is not a substitute for a settings panel, but it helps users who want more detail before deciding. The link text should be descriptive, like “Read our Cookie Policy,” not just “Learn more.”
Some sites use a two-step banner: first a small bar at the bottom with a brief message and an “Accept” button, and if the user clicks “Settings,” a larger modal opens. This keeps the initial view clean but still offers control. This pattern works well for blogs or portfolios where the main goal is to get the visitor to read content quickly.
Design Patterns That Match Your Site’s Look
Cookie banners do not have to look like a system alert. You can style them to match your brand colors, fonts, and overall design. A clean, minimal banner with a white background, a subtle border, and rounded corners fits most modern websites. For a more playful brand, use a colored background and a friendly tone, like “We care about your privacy. Choose what you share.” The buttons should still be high-contrast and easy to tap on a phone.
Positioning matters. A bottom banner is the most common because it does not interrupt reading. A top banner is also fine, but it pushes content down, which can be annoying on mobile. A centered modal is more intrusive but forces a decision before any interaction. Use a modal only when you need explicit consent before any non-essential cookies load, which is required in some jurisdictions like Italy and Spain.
On mobile, the banner should take up no more than half the screen height. Buttons should be at least 44 pixels tall for easy tapping. The text should be readable without zooming, so use a font size of at least 14 pixels. If the banner has multiple buttons, stack them vertically on narrow screens to avoid mis-taps.
How to Write the Cookie Policy Link and Text
The banner text should be short and neutral. Avoid phrases like “We use cookies to give you the best experience” because that is vague. Instead, say “We use cookies to remember your preferences and understand how you use our site.” This is specific and honest. The policy link should be a separate line or part of the sentence, like “See our Cookie Policy for details.”
In the cookie policy itself, list every cookie your site sets, its purpose, duration, and whether it is first-party or third-party. This is not just for compliance—it helps users trust you. The policy should also explain how to delete or block cookies in the browser settings, and how to withdraw consent at any time. Provide a “Withdraw Consent” link in the footer or in the privacy policy.
If you use third-party services like Google Analytics, Facebook Pixel, or YouTube embeds, mention them by name in the policy. The banner does not need to list every cookie, but the policy must. Update the policy whenever you add or remove a cookie.
Common Mistakes to Avoid in Cookie Banners
One mistake is making the “Reject All” button gray or low-contrast, which nudges users to accept. This is a dark pattern and is illegal under GDPR. Another mistake is pre-ticking the checkboxes for non-essential cookies. Consent must be opt-in, not opt-out. Also, do not use a “X” close button that accepts all cookies silently; that is not valid consent.
Another error is showing the banner again after the user has already made a choice. Once a user clicks Accept or Reject, store that decision in a cookie or localStorage and do not show the banner again until the consent expires. If the user clears their browser cookies, the banner will appear again, which is expected.
Finally, do not forget that the banner must work without JavaScript. If a user has JS disabled, the banner should still appear, or at least the site should not set non-essential cookies. Use a server-side solution or a noscript fallback to handle this edge case.
Real-World Examples to Copy and Adapt
Here are three concrete patterns you can adapt for your own site:
Simple Two-Button Banner
“We use cookies to improve your browsing experience and analyze site traffic. You can accept all or reject non-essential cookies. Read our Cookie Policy.” Buttons: “Accept All” and “Reject All.” This is best for small sites with minimal tracking.
Three-Button Banner with Settings
“We use cookies to personalize content and ads, and to analyze our traffic. You can choose your preferences. Learn more.” Buttons: “Accept All,” “Reject All,” and “Customize.” The customize button opens a panel with toggles for Analytics, Marketing, and Preferences. This works for e-commerce or content sites with multiple third-party tools.
Bottom Bar with Link to Full Settings
“This site uses cookies. By continuing, you agree to our Cookie Policy.” Buttons: “Accept” and “Settings.” The settings link opens a modal with detailed choices. This is a lighter approach, but make sure the “Accept” button is not the only option; the settings must include a reject-all option as well.
Each of these examples can be styled to match your brand. The key is to keep the text short, the buttons clear, and the options equal.
How to Test Your Cookie Banner
After you implement a banner, test it on different devices and browsers. Check that the banner appears only once, that the buttons work, and that the settings panel opens and closes correctly. Use your browser’s developer tools to see which cookies are set after clicking Accept vs. Reject. You should see no analytics or marketing cookies after a reject.
Also test with a clean browser profile (no existing cookies) to see the first-visit experience. Then clear cookies and reload to ensure the banner reappears. If you have a cookie consent management platform (CMP), use its testing mode to verify that the banner meets the platform’s requirements.
Finally, run a quick accessibility check: the banner should be keyboard-navigable, with focus indicators on buttons, and the text should have sufficient contrast. You can use browser extensions like Lighthouse or axe to check for common issues.
Related
- Muffin Top Examples: What They Look Like
- Cookie and Cream Spread Recipe
- Sugar Cookie Recipe That Does Not Spread
Safe minimum internal temperatures follow USDA FSIS; raw-fish guidance follows the U.S. FDA. See our food safety notes.
Spotted an error? Tell us and we will correct it (corrections policy).