Component libraryCookie banner
Components/Feedback

Cookie banner

Pro

A consumer-controlled cookie notice with native choice buttons, a real policy destination and no built-in persistence.

npx shadcn@latest add @tidal-pro/cookie-banner
Desktop viewport

Installation

Pro source is gated. Configure the @tidal-pro registry using the agent guide. Create an access key from your account after purchasing.

Terminal
npx shadcn@latest add @tidal-pro/cookie-banner

Import components/ui/tidal.css, components/ui/cookie-banner.css, then add the component inside a tidal-scope wrapper. Its scoped design tokens keep it independent of your existing CSS.

Usage

Complete example source · Dependency and asset manifest

Loading the complete example…

API & behavior

title and description label the notice through generated stable IDs. Optional badge and detail preserve numeric zero; headingLevel defaults to h2. policyLink renders a real native anchor with consumer href, label, optional accessible label, disabled state, native attributes and ref. An action-disabled or aria-disabled policy link prevents navigation before its caller handler, while explicit aria-disabled=false is preserved. actions are ordered native buttons with unique IDs, consumer labels, optional accessible labels, primary or secondary emphasis, disabled state, native attributes, refs and required onAction callbacks. Native action clicks run first and prevention suppresses the higher callback. actionsLabel names the button group, and emptyActionsMessage covers an empty action list. Root native attributes/ref pass through. The component performs no cookie read or write, consent mutation, request, route, analytics, network, storage or persistence action.

Style with the --t-* CSS variables. Set data-theme="dark" on your tidal-scope wrapper for a dark surface. Motion respects the system’s reduced-motion preference.

Building with an agent?Give it the installation guide and component catalog.