GOV.UK cookie banner component
Documents cookie banner use when a service sets cookies, accept and reject actions for non-essential cookies, saved preference confirmation, one-year preference storage, no non-essential cookies before consent, no sticky positioning, and cookies-page linkage.
What this source can teach
Use this source to compare a documented solution with the task and states in your own product.
- Start with the original. Open the source and find the guidance or example relevant to your task.
- Trace the connection. Use the claim notes below to see how this site applies the source to specific patterns.
- Check the setting. Compare the source's platform, people, and constraints with your own decision.
Pattern Decisions This Source Supports
| Pattern | Supported decision | Required contract | Claim note |
|---|---|---|---|
| Cookie banner | Choose cookie banner when a user must be told about cookies or similar technologies and must be able to accept or reject non-essential storage before it is set. | The banner appears before non-essential storage is set and remains until the user accepts, rejects, or saves preferences. | GOV.UK documents cookie banner actions, confirmation behavior, preference persistence, no non-essential cookies before acceptance, cookies-page linkage, and non-sticky placement. |
| Cookie consent | Choose cookie consent when the decision controls cookies, pixels, local storage, tags, SDKs, or similar storage and access on the user's device. | Optional cookies, pixels, local storage, analytics tags, advertising tags, and similar technologies remain blocked until the matching purpose is accepted. | Supports the relationship between the cookie banner entry surface and the saved cookie preference. |
Comparisons supported by this source
- Cookie banner vs banner vs notification banner vs site alert
GOV.UK documents cookie banner actions, confirmation behavior, preference persistence, no non-essential cookies before acceptance, cookies-page linkage, and non-sticky placement.
- Cookie consent vs cookie banner vs consent prompt vs preference center vs privacy settings vs legal acceptance
Supports banner entry, accept and reject actions, saved preference confirmation, no optional cookies before consent, and cookies-page linkage.
Evidence Role
This source is treated as pattern-library evidence. Its value comes from the specific claims and setting described above.
Publisher: GOV.UK Design System. Last checked: .