Skip to content
VenusUI
Get started

Galaxy Hero

A full-height hero over a turning particle galaxy.

Preview

Installation

npx shadcn@latest add @venusui/hero-11

Run this in a project set up with shadcn. If you haven’t set it up yet, run npx shadcn@latest init first.

Files added to your project

Paths use the default shadcn aliases. The CLI follows the aliases in your components.json.

  • @/hooks/use-scene-state.tsfrom use-scene-state
  • @/components/ui/particle-galaxy.tsxfrom particle-galaxy
  • @/components/ui/blur-text.tsxfrom blur-text
  • @/components/hero-11.tsx

Also adds the shadcn button component if your project doesn't have it yet.

Usage

The code behind the preview above.

hero-11-demo.tsx

import { Hero11 } from "@/components/hero-11"

export default function Hero11Demo() {
  return <Hero11 />
}

API reference

No props. Edit the content directly in the file.

Requirements

  • shadcn button, VenusUI particle-galaxy (three.js) and blur-text. The CLI installs them.
  • It renders inside a .dark wrapper so it stays dark in both themes; this relies on shadcn’s class-based dark mode (the default).
  • A browser with WebGL for the galaxy; the text works without it.

Customization

  • A dark wash behind the text keeps it readable; adjust it in the file.

Accessibility

  • One h1. The galaxy is a labelled image that pauses off screen and with reduced motion.

Troubleshooting

Something looks different from the preview.
Blocks use your project’s theme and your own shadcn components, so they follow your styles.
Unknown registry "@venusui"
Your shadcn CLI couldn’t find the namespace in the shadcn registry index. Use the latest CLI (npx shadcn@latest), install by URL, or register it with its address: npx shadcn@latest registry add @venusui=https://venusui.com/r/{name}.json.
No components.json found
Run npx shadcn@latest init in your project first.