Consent & cookies
Generated from
pattern-library/registry.json— do not edit by hand; change the registry and runbun run patterns:build.
Index card — the docs below are the canonical explanation; deep-tier pattern pages additionally carry invariants and emulation notes.
Category: Admin & Privacy · Tier: light · Maturity: proven (verified 2026-08-20 @ 1a130d67) · Risk: medium — consent bugs cause non-compliant cookie writes
Client-side consent state and a consent banner component that gate any cookie or storage write, satisfying ePrivacy/TDDDG consent requirements.
When to use: Use before writing any non-essential cookie or client-side tracking value that requires prior user consent.
Docs
Code
src/lib/state/consent.svelte.ts(GitHub · GitLab)src/lib/components/shell/ConsentBanner.svelte(GitHub · GitLab)
Proof
Machine-readable record: admin-privacy-consent-cookies in pattern-library/registry.json.