Measured entry

ruixen-banner-announcement

ctaunclassified

A client-side React announcement strip delivered as a shadcn registry component. It supports an optional badge, link, and dismiss control, with local entrance and collapse state. It depends on Tailwind utility classes, a project cn helper imported through the standard alias, and Lucide icons.

Specimen
Harness screenshot of ruixen-banner-announcement at 375 pixels wide
Harness screenshot at 375 pixels wide. No horizontal overflow recorded.
Harness screenshot of ruixen-banner-announcement at 768 pixels wide
Harness screenshot at 768 pixels wide. No horizontal overflow recorded.
Harness screenshot of ruixen-banner-announcement 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-announcement
BuildOK
MountOK
Console errors0
Uncaught page errors0
Horizontal overflowclean at 375, 768, 1440
Axe critical0
Axe serious0
Axe moderate0
Axe minor0
Gzip marginal28.1 KB (93.5 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 34.62s
error during build:
[vite:load-fallback] Could not load <sandbox>/src/lib/utils (imported by src/cut/banner-announcement.tsx): ENOENT: no such file or directory, open '<sandbox>/src/lib/utils'

Verdict

A focused, adaptable banner with clean props and a working dismiss transition. It needs a shadcn-style setup because the bare component cannot resolve its cn utility import. The shimmer also requires project keyframes that are not included in the registry item.

Use it if

  • You need a compact site-wide notice with an optional badge and direct call to action.
  • You want dismissal to last only until the component remounts.
  • Your app already uses shadcn conventions, Tailwind utilities, and Lucide icons.

Skip it if

  • Dismissal must persist across navigation or later visits without adding storage and state wiring.
  • Your design system does not use Tailwind or the shadcn cn utility pattern.
  • You need richer actions, scheduling, targeting, or announcement rotation built in.
  • You cannot add the missing banner shimmer keyframes or prefer no decorative motion.

Install

Installation record for ruixen-banner-announcement
Declared dependencieslucide-react
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 a cn class-merging helper, configure the source alias or replace that import, install Lucide React, and ensure Tailwind processes the component classes. Define the banner-shimmer keyframes if you want the sweep effect; otherwise remove that animation class.

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 cta pattern, ordered by what they measured: mounts first, then clean axe scans, then bare-mode passes, then the smaller bundle.