Skip to content
Pixelbits
Docs / Hero
Blocks

Hero

The first section of a landing page: eyebrow, large light heading, text, actions and an optional visual. Pure layout, no client code of its own.

Now in 1.0

Pixels, crafted with care.

A calm React UI kit whose pixel effects appear only when you interact.

Installation

npm: import
import { Hero } from "pixelbits/hero";
shadcn: copy the source
npx shadcn add https://pixelbits.ali-moradi-develop.com/r/block-hero.json

API

<Hero>

The first section of a landing page: eyebrow, large light heading, text, actions and an optional visual. Pure layout, no client code of its own.

Example
<Hero
  eyebrow="v1.0"
  title="Pixels, crafted with care."
  scramble
  description="A calm React UI kit."
  actions={<><Button variant="primary" size="lg">Get started</Button><Button size="lg">Docs</Button></>}
  media={<SpotlightCard className="aspect-square" />}
/>
PropTypeDefaultDescription
eyebrowReactNode—

Small label above the title, shown as an accent badge.

title*ReactNode—

The main heading (an <h1>). A string can decrypt in with scramble.

descriptionReactNode—

Supporting paragraph under the title.

actionsReactNode—

Calls to action, usually one primary and one secondary Button.

mediaReactNode—

Visual on the end side (an image, a SpotlightCard, a product shot).

scramblebooleanfalse

Decrypt the title with TextScramble when it enters the view (string titles only).

layout"split" | "center""split"

"split": text and media side by side on wide screens. "center": centered text, media below.

Also accepts every prop of Omit<HTMLAttributes<HTMLElement>, "title">.