Measured entry
ruixen-preview-switch-hero
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.



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.
| Build | OK |
|---|---|
| Mount | OK |
| Console errors | 0 |
| Uncaught page errors | 0 |
| Horizontal overflow | flagged at 375, 768 |
| Axe critical | 0 |
| Axe serious | 1 |
| Axe moderate | 0 |
| Axe minor | 0 |
| Gzip marginal | 53.2 KB (118.7 KB build, 65.5 KB baseline) |
| Bare mode | FAIL |
| Provider required | NO |
| Demo used | written 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
| Declared dependencies | lucide-react, clsx, tailwind-merge |
|---|---|
| Missing on install | none |
| Bare install | fails once the shadcn-style helpers are removed, so it needs that setup |
| Provider | no 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.
Author repository
github.com/ruixenui/ruixen.comAlternatives
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.
- ruixen-tabbed-hero-sectionunclassified
- Renders
- YES
- A11y
- 0
- Gzip
- 50.6KB
- Bare
- fail
- Prov
- NO
- 8bitcn-hero1skeuomorphism
- Renders
- YES
- A11y
- 0
- Gzip
- 51.5KB
- Bare
- fail
- Prov
- NO
- tailark-mist-hero-section-5minimal-flat
- Renders
- YES
- A11y
- 0
- Gzip
- 64.8KB
- Bare
- fail
- Prov
- NO
- tailark-mist-hero-section-6minimal-flat
- Renders
- YES
- A11y
- 0
- Gzip
- 64.8KB
- Bare
- fail
- Prov
- NO
- ruixen-arc-reveal-herounclassified
- Renders
- YES
- A11y
- 0
- Gzip
- 71.6KB
- Bare
- fail
- Prov
- NO
- tripled-cta-hero-block-shadcnuiminimal-flat
- Renders
- YES
- A11y
- 0
- Gzip
- 72.8KB
- Bare
- fail
- Prov
- NO