Did you know?dyk.si

Cookie Consent Banner

The bar at the bottom of a site asking whether you accept cookies.

role="dialog" aria-label="Cookies"

When to use it

When the site uses ad or analytics cookies, especially for EU visitors.

Common mistake

Don’t hide or bury the Reject option.

Accessibility

Make Reject as easy to reach as Accept, and keep it keyboard-operable.

Name in code

HTML/CSSrole="dialog" aria-label="Cookies"
ReactCookieConsent (custom)
Jetpack Composen/a (web pattern)
SwiftUIn/a (web pattern)

Ready prompt for your coding agent

Add a Cookie Consent Banner to this screen. What it is: The bar at the bottom of a site asking whether you accept cookies. Implement with: role="dialog" aria-label="Cookies" (HTML/CSS). Accessibility: Make Reject as easy to reach as Accept, and keep it keyboard-operable. When to use it: When the site uses ad or analytics cookies, especially for EU visitors. Avoid: Don’t hide or bury the Reject option. Reuse the project's existing design tokens, spacing and component conventions.

Or compose a whole page from this element and others →

Prompts are in English for the most precise results with coding agents.