Measured entry

ruixen-preview-switch-hero

herounclassified

A client-side React and Next.js hero that pairs lead-generation copy with a tab-controlled product preview, optional email capture, social proof, and a logo rail. It ships as a shadcn registry component and depends on Tailwind theme classes, Next Link, Lucide icons, and the usual cn utility backed by clsx and tailwind-merge.

Specimen
Harness screenshot of ruixen-preview-switch-hero at 375 pixels wide
Harness screenshot at 375 pixels wide. This viewport scrolled sideways.
Harness screenshot of ruixen-preview-switch-hero at 768 pixels wide
Harness screenshot at 768 pixels wide. This viewport scrolled sideways.
Harness screenshot of ruixen-preview-switch-hero 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-preview-switch-hero
BuildOK
MountOK
Console errors0
Uncaught page errors0
Horizontal overflowflagged at 375, 768
Axe critical0
Axe serious1
Axe moderate0
Axe minor0
Gzip marginal53.2 KB (118.7 KB build, 65.5 KB baseline)
Bare modeFAIL
Provider requiredNO
Demo usedwritten from the component source API

What the harness recorded

BARE BUILD

✗ Build failed in 4m 42s
error during build:
[vite:load-fallback] Could not load <sandbox>/src/lib/utils (imported by src/cut/components/ruixen/preview-switch-hero.tsx): ENOENT: no such file or directory, open '<sandbox>/src/lib/utils'

Verdict

A capable, flexible hero for an established shadcn-based Next.js site, but not a drop-in for a bare React project. It needs a shadcn-style setup to mount, and teams should budget time to fix narrow-width overflow and contrast before shipping.

Use it if

  • You need a product or scheduling landing-page hero with several previews selectable by labeled tabs.
  • Your app already uses Next.js, Tailwind theme tokens, and a shadcn-style cn utility.
  • You want configurable calls to action, ratings, avatars, email capture, and customer logos in one composition.

Skip it if

  • Your layout must avoid horizontal page overflow on phone and tablet widths without additional CSS work.
  • You need the supplied muted text and controls to pass contrast checks without retuning theme colors.
  • You are building outside Next.js and do not want to replace the framework-specific Link component.
  • You want a lightweight static hero without client state, icons, tab switching, or a broad set of optional proof elements.

Install

Installation record for ruixen-preview-switch-hero
Declared dependencieslucide-react, clsx, tailwind-merge
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 Tailwind with the referenced semantic color and ring tokens, install Lucide, clsx, and tailwind-merge, create the aliased cn helper, and configure the alias. Outside Next.js, replace Next Link with your router link or a standard anchor.

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