Cookie Preference CentrePRO

An interactive cookie notice with four hairline categories on live switches, a locked required group, save and reject-all actions, and a scrollable table naming every cookie, its purpose, and its retention.

An interactive cookie notice with four hairline categories on live switches, a locked required group, save and reject-all actions, and a scrollable table naming every cookie, its purpose and its retention.

Upgrade to Pro

Pro blocks install through the shadcn CLI with your license key and ship their full source. Docs and live previews stay open to everyone, so you can read every block's details first.

Upgrade Now

Installation

Swap YOUR_EMAIL and YOUR_KEY for the email and license key on your account. Find your license key on your account page.

Radix flavor

bash
npx shadcn add "https://ui.beste.co/r/legal57?email=YOUR_EMAIL&license_key=YOUR_KEY"

Base UI flavor

bash
npx shadcn add "https://ui.beste.co/r-base/legal57?email=YOUR_EMAIL&license_key=YOUR_KEY"

This installs the block to components/beste/block/legal57.tsx, the shadcn/ui switch component it depends on, and the badge23 and button21 components it uses for the eyebrow and the actions.

Quick start

The installed file exports legal57Demo alongside the block: the exact props behind the preview above. Spread it to get a working preference centre in one line.

tsx
import { Legal57, legal57Demo } from "@/components/beste/block/legal57";

export default function CookiesPage() {
  return <Legal57 {...legal57Demo} />;
}

Then replace the demo with your own props. Written out, a trimmed setup looks like this:

tsx
import { Legal57 } from "@/components/beste/block/legal57";

export default function CookiesPage() {
  return (
    <Legal57
      badge={{ label: "Cookie preferences" }}
      heading="Choose what we are allowed to remember"
      description="Only the first group is required for the product to work."
      categories={[
        {
          name: "Strictly necessary",
          description: "Keeps you signed in. Cannot be switched off.",
          locked: true,
          defaultOn: true,
        },
        {
          name: "Analytics",
          description: "Counts which screens get used, aggregated and never linked to a record.",
          defaultOn: false,
        },
      ]}
      acceptLabel="Save preferences"
      rejectLabel="Reject everything optional"
      finePrint="Your choice is stored for twelve months."
      tableTitle="Every cookie we set"
      columns={["Cookie", "Set by", "Purpose", "Kept for"]}
      rows={[
        {
          name: "sir_session",
          provider: "Sirius",
          purpose: "Keeps you signed in between page loads",
          retention: "Session",
        },
      ]}
    />
  );
}

Props

PropTypeDefaultDescription
badge{ label: string }Eyebrow above the heading, rendered through Badge23
headingstringSection heading, capped at max-w-2xl
descriptionstringSupporting paragraph, capped at max-w-xl
categoriesCookieCategory[][]Toggleable groups, with the required one locked
acceptLabelstringLabel for the save action
rejectLabelstringLabel for the reject-all action
finePrintstringStorage note beside the actions
tableTitlestringSmall label above the cookie table
columnsstring[][]Table column headings
rowsCookieRow[][]Every cookie the site sets
classNamestringExtra classes for the outer section
ts
type CookieCategory = {
  name: string;
  description: string;
  locked?: boolean;
  defaultOn?: boolean;
};

type CookieRow = {
  name: string;
  provider: string;
  purpose: string;
  retention: string;
};

Behavior notes

More Legal blocks

View all Legal
PRO

legal6

Consent Preferences Manager

Displays cookie categories with toggle switches to manage consent preferences. Perfect for allowing users to customize their privacy settings granularly.

PRO

legal16

Cookie Categories Explainer

Explains cookie types (essential, functional, analytics, marketing) with icons and examples. Perfect for cookie policy pages educating users on tracking technologies.

PRO

legal44

Cookie Policy

Cookie policy card listing each cookie type with name, description, and required/optional badge. Suitable for dedicated cookie policy pages or modals.

PRO

legal1

Cookie Consent Banner

Displays a cookie notification with accept, reject, and customize buttons. Perfect for GDPR-compliant websites requiring user consent.

PRO

legal50

Tabbed Platform Policies

Multi-section policy card using tabs to switch between data use, security, cookies, and user rights content. Compact way to present multiple policies.

PRO

legal2

Privacy Policy Accordion

Shows privacy policy content with expandable accordion sections for each topic. Perfect for organizing lengthy privacy policies into scannable segments.