Measured entry

ruixen-banner-cookie

cardglassmorphism

A client-side React cookie consent card shipped as a shadcn registry component. It renders configurable copy with Accept and Decline actions, then animates itself away before calling the supplied callback. It relies on Tailwind utilities, shadcn theme tokens, the local cn helper, and project-defined cookie entrance and exit keyframes.

Specimen
Harness screenshot of ruixen-banner-cookie at 375 pixels wide
Harness screenshot at 375 pixels wide. No horizontal overflow recorded.
Harness screenshot of ruixen-banner-cookie at 768 pixels wide
Harness screenshot at 768 pixels wide. No horizontal overflow recorded.
Harness screenshot of ruixen-banner-cookie at 1440 pixels wide
Harness screenshot at 1440 pixels wide. No horizontal overflow recorded.

Measured

Every value below was written by the harness on the run that produced the frames above. None of it is derived from the prose.

Harness measurements recorded for ruixen-banner-cookie
BuildOK
MountOK
Console errors0
Uncaught page errors0
Horizontal overflowclean at 375, 768, 1440
Axe critical0
Axe serious0
Axe moderate0
Axe minor0
Gzip marginal27.5 KB (92.9 KB build, 65.4 KB baseline)
Bare modeFAIL
Provider requiredNO
Demo usedwritten from the component source API

What the harness recorded

BARE BUILD

✗ Build failed in 32.16s
error during build:
[vite:load-fallback] Could not load <sandbox>/src/lib/utils (imported by src/cut/banner-cookie.tsx): ENOENT: no such file or directory, open '<sandbox>/src/lib/utils'

Verdict

A tidy presentation component with clear callbacks and clean verified behavior, but not a compliance solution by itself. It needs a shadcn-style setup to build and mount, and its animation names must exist in the host theme. Choose it when consent logic already lives elsewhere.

Use it if

  • You want a compact consent prompt that can sit inside your own banner or page layout.
  • Your app already uses shadcn conventions, Tailwind theme tokens, and the cn utility.
  • You can connect the callbacks to your consent storage and tracking controls.

Skip it if

  • You need a complete consent manager with categories, policy links, persistence, and script blocking built in.
  • Your project does not use Tailwind or shadcn-style theme tokens and you do not want to recreate that styling layer.
  • You require motion to work without adding the referenced custom keyframes.
  • You need the component to appear as a fixed site-wide banner without wrapping or positioning it yourself.

Install

Installation record for ruixen-banner-cookie
Declared dependenciesnone declared
Missing on installnone
Bare installfails once the shadcn-style helpers are removed, so it needs that setup
Providerno provider required in the harness

In a non-shadcn project, add the cn class-merging helper and its import alias, configure Tailwind with equivalent card, border, foreground, muted, and primary theme tokens, and define the cookie entrance and exit keyframes. Add client-side consent persistence and tracking controls around the callbacks.

Source and credit

This page is a review, not a copy. The component source lives with its author and this site does not republish it. Read the license before you use anything.

Alternatives

Other published entries for the card pattern, ordered by what they measured: mounts first, then clean axe scans, then bare-mode passes, then the smaller bundle.