8-bit Main Menu
8bitcn/main-menuFreeBlock
A simple 8-bit main menu component
Install it
npx shadcn@latest add https://www.8bitcn.com/r/main-menu.jsonSource
1import { cn } from "@/lib/utils";23import { Button } from "@/components/ui/8bit/button";4import {5 Card,6 CardContent,7 CardDescription,8 CardHeader,9 CardTitle,10} from "@/components/ui/8bit/card";1112const menuItems = [13 {14 label: "START GAME",15 action: () => console.log("Starting game..."),16 },17 {18 label: "OPTIONS",19 action: () => console.log("Showing options..."),20 },21 {22 label: "HIGH SCORES",23 action: () => console.log("Showing high scores..."),24 },25 {26 label: "MULTIPLAYER",27 action: () => console.log("Multiplayer mode..."),28 },29 { label: "QUIT", action: () => console.log("Quitting game...") },30];3132export default function MainMenu({33 className,34 ...props35}: React.ComponentProps<"div">) {36 return (37 <Card className={cn(className)} {...props}>38 <CardHeader className="flex flex-col items-center justify-center gap-2">39 <CardTitle>Main Menu</CardTitle>40 <CardDescription>Retro 8-bit Quest</CardDescription>41 </CardHeader>42 <CardContent>43 <div className="flex flex-col gap-4">44 {menuItems.map((item) => (45 <Button key={item.label} className="flex items-center gap-2">46 <span>{item.label}</span>47 </Button>48 ))}49 </div>50 </CardContent>51 </Card>52 );53}
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 |
