Skip to main content

BETANow in public beta.Public betaBeta

日本語Español

CKE-002 Published

Cookie banner with toggles

Cookie consent with a switch for each cookie category inside the bar, so people choose on the spot.

FigmaThis part is included in our free, editable Figma file: 235 website UI patterns across 32 parts, 2 designs each Open in Figma Community ↗ (opens in a new tab)

Wireframe (desktop) | Cookie banner with toggles

Cookie banner with toggles UI design (desktop wireframe)

Wireframe (mobile) | Cookie banner with toggles

Cookie banner with toggles UI design (mobile wireframe)

What changes on mobile

  1. Switches in two columns and two rows: Four categories do not fit in one row, so each name and switch share a box, arranged in two columns.
  2. "Allow selected" runs full width: Three buttons in a row would wrap their labels, so Reject all and Accept all sit in two columns with Allow selected below.

Before you choose this pattern | Cookie banner with toggles

Good fit

  • You use several kinds of cookies, such as analytics and advertising, and want people to choose by category
  • You want people to choose the first time, without opening another screen
  • There are no more than three or four categories

Poor fit

Why this wireframe works | Cookie banner with toggles

People choose by category without opening another screen

Because the category switches are inside the bar, even someone who only wants to allow analytics can finish choosing the first time.

Necessary cookies say “Always on” and cannot be switched

Cookies the site needs to work are labeled in words as impossible to turn off. It is clear at a glance what can and cannot be chosen.

Reject all and Accept all carry equal weight

Matching buttons sit at both ends, with “Allow selected” between them. Every way of choosing takes the same effort.

Common mistakes | Cookie banner with toggles

Switches start in the on position

If analytics and advertising switches start on, people who save without touching anything are counted as having allowed them. Start everything except necessary cookies off.

On and off differ only by color

The shade of a switch alone is hard for some people to read. Add the words “On” and “Off”, and use role=”switch” and aria-checked so screen readers announce the state too.

Category names alone do not say what cookies are for

“Functional” or “Analytics” alone gives people little to go on. Put explanations that do not fit in the bar behind “Learn more about cookies”.

Too many categories, and the bar covers half the screen

With five or more categories, the bar grows and hides the content. When there are many, move them to a cookie settings panel.

FAQ | Cookie banner with toggles

How many categories can fit in the bar?

Three or four, which fit in one row on desktop and in two columns and two rows on mobile. For more than that, or to show a list of recipients for each category, use the cookie settings panel.

Should the “Allow selected” button stand out?

Making just one of the three stand out looks like steering people toward that choice. Give Reject all and Accept all the same look and make Allow selected an outlined button, for example, so every option is easy to press.

Is a cookie consent bar always required?

Whether you need consent, and how much you need to explain, depends on the cookies you use, the data sent to outside services, and the rules where your users are. Examples include GDPR and the ePrivacy Directive in the EU, US state laws such as CCPA/CPRA, and Japan’s rules on sending user data to third parties. This pattern is an example of how to build the screen; for legal decisions, check with a specialist as needed.

Share this pattern

Send this page to your team or your design partner.

Was this pattern useful?

Written by

Yuta Okano

ENVY DESIGN Inc.

CEO / Director / Designer

14 years in the web industry. Has worked on more than 500 web projects, from corporate and recruiting sites to e-commerce. Focuses on information architecture, direction and design, from planning websites to improving them. In recent years he has focused on AIO (AI optimization) and GEO, helping sites get cited by generative AI search such as ChatGPT, Perplexity and Google AI Overviews.

Review and revision history

  1. Published AvatarYuta Okano Pattern published