Cookie Banner
Cookie banner allows users to accept or reject cookies which are not essential to making your service work.
Overview
The purpose of the cookie banner is to inform users about the use of cookies, obtain their consent, and customise their preferences.
It aids websites in complying with privacy regulations by offering transparency regarding data collection practices and empowering users to control their privacy settings.
Anatomy
- Banner: Contains the content.
- Title: Provides context to the Banner.
- Body copy: Provides supporting context to the user.
- Call to actions: Allow the user to proceed with multiple options.
- Modal: A closeable window that overlays a page.
- Content: Provides information for the user about the cookie preference options available.
- “Save” button: Allows the user to save their preferences and continue with their flow.
- Scrim: Screen overlay that obscures the on-page content.
Variations
Banner
Modal
Modifiers
Banner
Default
Primary actions only
This version is used when legal compliance in the country requires you to do so. In countries that do not require this, the default variation is used.
Interaction area
- Redirect: Redirects the user to the page they have selected in a new tab, the cookie banner will continue to show until the user makes a selection.
- Confirm selection: Saves the user's selection and closes the modal and cookie banner.
- Opens a “Manage preferences” modal: A modal will open to allow the user to manage their preferences.
- Toggle on/off: Allows the user to toggle selections on or off.
- Back button: Closes the modal and shows the cookie banner again.
Content
Behaviours
Background
Banner
The background page of the cookie banner isn’t disabled, and is only disabled once the modal is opened. The “Select your country” popover from the top navigation should sit on top of the banner so that the users can change the locale.
Modal
The background page is disabled when the modal is opened until the user has made a selection and is ready to continue with their flow, or returns to the banner. A scrim is applied and the banner disappears.
Turn all on / off
Once the overarching toggle is toggled on/off, the child toggles follow suit. The overarching toggle will not be toggled on unless all child toggles are selected.
Positioning
Banner
The cookie banner is always positioned at the bottom of the screen with default bottom, left and right padding of 16px from the container of the banner.
Modal
The modal is positioned in the centre of the screen with a scrim applied.
Responsive design
Narrow
At the narrow breakpoints, the banner has a maximum height of 432px, and the modal is set to full screen. If the content overflows due to a change in language, the available height, the call to action buttons and header become sticky and the body content scrolls.
Banner
Modal
Motion
All motion details for the cookie banner can be found here, it also defines how the motion between the banner and modal overlap.
Right-to-left languages
For languages that read right-to-left, the layout and alignment of the content is reorganised so the readability of the component makes logical sense.
Wide
Narrow
Resources
Stable | |
Stable | |
Stable | |
Vue [Fozzie] | N/A |
React [Snacks] | N/A |
iOS JustUI [UI Kit] | N/A |
iOS PIE [SwiftUI] | N/A |
Android PIE [Compose & Views] | N/A |