8-bit Hero 1
8bitcn/hero1FreeBlock
Centered hero section
Install it
npx shadcn@latest add https://www.8bitcn.com/r/hero1.jsonSource
1import Link from "next/link";2import type { ReactNode } from "react";34import { cn } from "@/lib/utils";56import { Badge } from "@/components/ui/8bit/badge";7import { Button } from "@/components/ui/8bit/button";89import "@/components/ui/8bit/styles/retro.css";1011interface HeroBadge {12 label: string;13 variant?: "default" | "destructive" | "outline" | "secondary";14}1516interface HeroAction {17 href?: string;18 label: string;19 onClick?: () => void;20 variant?: "default" | "destructive" | "ghost" | "outline" | "secondary";21}2223interface Hero1Props {24 actions?: HeroAction[];25 badges?: HeroBadge[];26 children?: ReactNode;27 className?: string;28 description?: string;29 subtitle?: string;30 title: string;31}3233export default function Hero1({34 title,35 subtitle,36 description,37 actions = [],38 badges = [],39 className,40 children,41}: Hero1Props) {42 return (43 <section44 className={cn(45 "relative w-full overflow-hidden px-4 py-16 md:py-24",46 className,47 )}48 >49 {/* Scanline overlay */}50 <div51 aria-hidden="true"52 className="pointer-events-none absolute inset-0 opacity-[0.03]"53 style={{54 backgroundImage:55 "repeating-linear-gradient(0deg, transparent, transparent 2px, currentColor 2px, currentColor 3px)",56 }}57 />5859 <div className="relative mx-auto max-w-4xl text-center">60 {/* Badges */}61 {badges.length > 0 && (62 <div className="mb-6 flex flex-wrap justify-center gap-4">63 {badges.map((badge) => (64 <Badge key={badge.label} variant={badge.variant}>65 {badge.label}66 </Badge>67 ))}68 </div>69 )}7071 {/* Title */}72 <h1 className="retro mb-4 font-bold text-3xl tracking-tight md:text-5xl lg:text-6xl">73 {title}74 </h1>7576 {/* Subtitle */}77 {subtitle && (78 <p className="retro mb-4 text-muted-foreground text-xs md:text-sm">79 {subtitle}80 </p>81 )}8283 {/* Description */}84 {description && (85 <p className="mx-auto mb-8 max-w-2xl text-muted-foreground retro text-[9px] leading-relaxed">86 {description}87 </p>88 )}8990 {/* Actions */}91 {actions.length > 0 && (92 <div className="flex flex-wrap justify-center gap-4">93 {actions.map((action) =>94 action.href ? (95// … truncated
What it pulls in
Other registry items
Files it writes
More from 8bitcn
All 121 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| 8-bit Advanced 1advanced1 | 8bitcn | Blocks | Free | no deps · 3 files | |
| 8-bit Advanced 2advanced2 | 8bitcn | Blocks | Free | no deps · 5 files | |
| 8-bit Advanced 3advanced3 | 8bitcn | Blocks | Free | no deps · 6 files | |
| 8-bit Audio Settingsaudio-settings | 8bitcn | Blocks | Free | 2 deps · 7 files | |
| 8-bit Chapter Introchapter-intro | 8bitcn | Blocks | Free | no deps · 3 files | |
| 8-bit Character Sheetcharacter-sheet | 8bitcn | Blocks | Free | no deps · 9 files | |
| 8-bit Chartchart | 8bitcn | Blocks | Free | no deps · 3 files | |
| 8-bit Chart Area Stepchart-area-step | 8bitcn | Blocks | Free | no deps · 3 files |
