Responsive Design
The banner must be fully usable on mobile viewports. The Reject button must never be hidden or obscured at any screen width.
Default responsive behavior
Section titled “Default responsive behavior”The banner uses flex-wrap: wrap on .ag-btns out of the box. At narrow viewports, the three consent buttons stack vertically. This behavior is intentional and GDPR-correct — all three buttons remain equally accessible.
The template’s defaultLayout also matters:
barlayout → anchored to bottom, full width — requires no responsive adjustment for most sites.dialoglayout → centered with max-width — shrinks with the viewport on mobile.floatinglayout → corner card — fixed position, adapts naturally on mobile.
Banner breakpoints
Section titled “Banner breakpoints”Kookiok does not enforce fixed breakpoints — the banner is fluid. Use @media queries in your custom CSS to adjust at your site’s breakpoints.
Recommended adjustment points:
| Viewport width | Typical adjustment |
|---|---|
< 480px | Reduce padding on .ag-banner-inner |
< 600px | Let .ag-btns stack fully (already default via flex-wrap) |
< 768px | Consider reducing heading font size |
Mobile button stacking
Section titled “Mobile button stacking”The default wrapping behavior works for most sites. If you need to enforce explicit stacking:
@media (max-width: 540px) { .ag-btns { flex-direction: column; } .ag-btn { width: 100%; }}Compact mobile layout
Section titled “Compact mobile layout”@media (max-width: 480px) { .ag-banner-inner { padding: 14px; } .ag-title { font-size: 16px; } .ag-desc { font-size: 13px; margin-bottom: 10px; } .ag-btns { gap: 8px; } .ag-btn { min-height: 44px; /* Keep 44px minimum for WCAG AA touch target */ padding: 10px 14px; }}Category detail panel
Section titled “Category detail panel”The .ag-detail-grid uses a CSS grid that automatically collapses on mobile. If you override the grid layout:
@media (max-width: 600px) { .ag-detail-grid { grid-template-columns: 1fr; }}Overlay on mobile
Section titled “Overlay on mobile”On mobile, the full-viewport overlay (--surface-overlay on .ag-overlay) is especially important to prevent accidental interaction with page content. Keep the overlay opaque enough to indicate modal state. A bar or a floating banner with “Dim the page behind the banner” switched off has no overlay to style.
@media (max-width: 768px) { :host { --surface-overlay: rgba(10, 15, 30, 0.75); }}