Compositions
CookieBanner
Cookie consent banner: a title and description beside a stack of actions. Lays itself out from its own width (a container query), stacking the copy above the buttons when narrow and setting them side by side when wide.
Usage
Best practices
The app places and sizes it (e.g.
fixed inset-x-4 bottom-4 max-w-3xl); it has no intrinsic width, so a fixed corner without a width collapses it.Only wire the actions you support: Reject and Cookie settings render only when
onReject/onSettingsare passed.It records nothing. Store the visitor's choice in the handlers and stop rendering the banner once they have made it.
Props
Also exports
- interface
CookieBannerProps