Cookie consent
CoreA consent bar that morphs into preferences and folds into a reopen button.
pnpm dlx shadcn@latest add https://wui.alann.works/r/cookie-consent.jsonAPI Reference
| Prop | Type | Default |
|---|---|---|
categories | CookieCategory[] | — |
value | CookieConsentValue | null | — |
defaultValue | CookieConsentValue | null | — |
onChange | (value: CookieConsentValue | null, detail: { action: CookieConsentAction; updatedAt: Date }) => void | — |
storageKey | string | — |
version | string | — |
preferencesOpen | boolean | — |
defaultPreferencesOpen | boolean | — |
onPreferencesOpenChange | (open: boolean) => void | — |
policy | { label: string; href?: string; onClick?: () => void } | — |
position | "bottom" | "bottom-left" | "bottom-right" | — |
strategy | "fixed" | "absolute" | — |
showReopenButton | boolean | — |
reopenSide | "left" | "right" | — |
labels | Partial<CookieConsentLabels> | — |
className | string | — |