"use client"; import { useState } from "react"; /** * Design scaffolds — styled React mockups showing what each UI library * looks like for a given surface. Used in the Design page preview area. * * Each scaffold is rendered at its natural size inside a scaled container, * giving the user a realistic feel for the library's visual language. */ // --------------------------------------------------------------------------- // Shared mock data // --------------------------------------------------------------------------- const TABLE_ROWS = [ { name: "Alice Martin", email: "alice@co.com", role: "Admin", status: "Active", date: "Jan 12" }, { name: "Ben Walsh", email: "ben@co.com", role: "Member", status: "Pending", date: "Jan 14" }, { name: "Clara Kim", email: "clara@co.com", role: "Member", status: "Active", date: "Jan 15" }, { name: "David Osei", email: "david@co.com", role: "Viewer", status: "Inactive", date: "Jan 16" }, ]; type Page = "Dashboard" | "Users" | "Settings"; // --------------------------------------------------------------------------- // Theme color definitions // --------------------------------------------------------------------------- export interface ThemeColor { id: string; label: string; primary: string; // button bg, active dot, toggle on primaryFg: string; // text on primary bg activeBg: string; // sidebar active item bg activeFg: string; // sidebar active item text ring: string; // focus ring / subtle tint } export const SHADCN_THEMES: ThemeColor[] = [ { id: "neutral", label: "Neutral", primary: "#18181b", primaryFg: "#fff", activeBg: "#f4f4f5", activeFg: "#18181b", ring: "#e4e4e7" }, { id: "blue", label: "Blue", primary: "#3b82f6", primaryFg: "#fff", activeBg: "#eff6ff", activeFg: "#1d4ed8", ring: "#bfdbfe" }, { id: "green", label: "Green", primary: "#22c55e", primaryFg: "#fff", activeBg: "#f0fdf4", activeFg: "#15803d", ring: "#bbf7d0" }, { id: "orange", label: "Orange", primary: "#f97316", primaryFg: "#fff", activeBg: "#fff7ed", activeFg: "#c2410c", ring: "#fed7aa" }, { id: "red", label: "Red", primary: "#ef4444", primaryFg: "#fff", activeBg: "#fef2f2", activeFg: "#b91c1c", ring: "#fecaca" }, { id: "rose", label: "Rose", primary: "#f43f5e", primaryFg: "#fff", activeBg: "#fff1f2", activeFg: "#be123c", ring: "#fecdd3" }, { id: "violet", label: "Violet", primary: "#8b5cf6", primaryFg: "#fff", activeBg: "#f5f3ff", activeFg: "#6d28d9", ring: "#ddd6fe" }, { id: "yellow", label: "Yellow", primary: "#eab308", primaryFg: "#000", activeBg: "#fefce8", activeFg: "#a16207", ring: "#fef08a" }, ]; export const MANTINE_THEMES: ThemeColor[] = [ { id: "blue", label: "Blue", primary: "#228be6", primaryFg: "#fff", activeBg: "#e7f5ff", activeFg: "#1971c2", ring: "#a5d8ff" }, { id: "teal", label: "Teal", primary: "#12b886", primaryFg: "#fff", activeBg: "#e6fcf5", activeFg: "#087f5b", ring: "#96f2d7" }, { id: "violet", label: "Violet", primary: "#7950f2", primaryFg: "#fff", activeBg: "#f3f0ff", activeFg: "#5f3dc4", ring: "#d0bfff" }, { id: "red", label: "Red", primary: "#fa5252", primaryFg: "#fff", activeBg: "#fff5f5", activeFg: "#c92a2a", ring: "#ffc9c9" }, { id: "orange", label: "Orange", primary: "#fd7e14", primaryFg: "#fff", activeBg: "#fff4e6", activeFg: "#d9480f", ring: "#ffd8a8" }, { id: "green", label: "Green", primary: "#40c057", primaryFg: "#fff", activeBg: "#ebfbee", activeFg: "#2f9e44", ring: "#b2f2bb" }, ]; export const HEROUI_THEMES: ThemeColor[] = [ { id: "violet", label: "Violet", primary: "#7c3aed", primaryFg: "#fff", activeBg: "rgba(124,58,237,0.3)", activeFg: "#c084fc", ring: "rgba(168,85,247,0.3)" }, { id: "blue", label: "Blue", primary: "#2563eb", primaryFg: "#fff", activeBg: "rgba(37,99,235,0.3)", activeFg: "#93c5fd", ring: "rgba(59,130,246,0.3)" }, { id: "rose", label: "Rose", primary: "#e11d48", primaryFg: "#fff", activeBg: "rgba(225,29,72,0.3)", activeFg: "#fda4af", ring: "rgba(244,63,94,0.3)" }, { id: "green", label: "Green", primary: "#16a34a", primaryFg: "#fff", activeBg: "rgba(22,163,74,0.3)", activeFg: "#86efac", ring: "rgba(34,197,94,0.3)" }, { id: "orange", label: "Orange", primary: "#ea580c", primaryFg: "#fff", activeBg: "rgba(234,88,12,0.3)", activeFg: "#fdba74", ring: "rgba(249,115,22,0.3)" }, ]; export const TREMOR_THEMES: ThemeColor[] = [ { id: "blue", label: "Blue", primary: "#2563eb", primaryFg: "#fff", activeBg: "#eff6ff", activeFg: "#1d4ed8", ring: "#bfdbfe" }, { id: "indigo", label: "Indigo", primary: "#4f46e5", primaryFg: "#fff", activeBg: "#eef2ff", activeFg: "#3730a3", ring: "#c7d2fe" }, { id: "teal", label: "Teal", primary: "#0d9488", primaryFg: "#fff", activeBg: "#f0fdfa", activeFg: "#0f766e", ring: "#99f6e4" }, { id: "rose", label: "Rose", primary: "#e11d48", primaryFg: "#fff", activeBg: "#fff1f2", activeFg: "#be123c", ring: "#fecdd3" }, { id: "amber", label: "Amber", primary: "#d97706", primaryFg: "#fff", activeBg: "#fffbeb", activeFg: "#92400e", ring: "#fde68a" }, ]; // Small swatch strip rendered inside each scaffold's header function ThemeSwatches({ themes, selected, onSelect }: { themes: ThemeColor[]; selected: ThemeColor; onSelect: (t: ThemeColor) => void; }) { return (
{themes.map(t => (
); } // --------------------------------------------------------------------------- // WEB APP — shadcn // --------------------------------------------------------------------------- function ShadcnDashboard({ t }: { t: ThemeColor }) { return (
{["Total Revenue", "Active Users", "Conversions"].map((label, i) => (

{label}

{["$12,400", "2,841", "18.2%"][i]}

+{[12, 8, 3][i]}% from last month

))}
Revenue
{[40,60,45,75,65,85,70,90,55,80,75,95].map((h,i)=>(
))}
Recent activity
{TABLE_ROWS.slice(0,3).map(r=>(

{r.name}

{r.email}

{r.status}
))}
); } function ShadcnUsers({ t }: { t: ThemeColor }) { return (
Team members
Invite
{["Name","Role","Status","Joined",""].map(h=>)}{TABLE_ROWS.map(r=>( ))}
{h}

{r.name}

{r.email}

{r.role} {r.status} {r.date}
···
); } function ShadcnSettings({ t }: { t: ThemeColor }) { return (
General
{[{l:"Workspace name",v:"Acme Inc"},{l:"Slug",v:"acme-inc"},{l:"Email",v:"admin@acme.com"}].map(f=>(
))}
Save changes
Notifications
{["Email digests","Push notifications","Security alerts","Product updates"].map((label,i)=>(

{label}

Receive {label.toLowerCase()}

))}
); } export function WebAppShadcn() { const [page, setPage] = useState("Dashboard"); const [theme, setTheme] = useState(SHADCN_THEMES[0]); const NAV_ITEMS: { label: Page; icon: string }[] = [ { label: "Dashboard", icon: "▦" }, { label: "Users", icon: "◎" }, { label: "Settings", icon: "⚙" }, ]; return (
{/* Sidebar */}
Acme Inc
{NAV_ITEMS.map(({ label, icon }) => ( ))}
{/* Main */}
{page}
Export
+ New
{page === "Dashboard" && } {page === "Users" && } {page === "Settings" && }
); } function MantineDashboard({ t }: { t: ThemeColor }) { return (
{[{l:"Total Revenue",v:"$12,400",c:"#2f9e44"},{l:"Active Users",v:"2,841",c:"#228be6"},{l:"Conversions",v:"18.2%",c:"#e67700"}].map(item=>(

{item.l}

{item.v}

↑ trending up

))}
Monthly revenue
{[40,60,45,75,65,85,70,90,55,80,75,95].map((h,i)=>(
))}
Recent
{TABLE_ROWS.slice(0,3).map(r=>(

{r.name}

{r.email}

{r.status}
))}
); } function MantineUsers({ t }: { t: ThemeColor }) { return (
Team members
{["Member","Role","Status","Joined","Actions"].map(h=>)}{TABLE_ROWS.map(r=>( ))}
{h}

{r.name}

{r.email}

{r.role} {r.status} {r.date}
); } function MantineSettings({ t }: { t: ThemeColor }) { return (
Workspace
{[{l:"Name",v:"Acme Inc"},{l:"Slug",v:"acme-inc"},{l:"Email",v:"admin@acme.com"}].map(f=>(
))}
Notifications
{["Email digests","Push notifications","Security alerts","Product updates"].map((label,i)=>(

{label}

Get notified via {label.split(" ")[0].toLowerCase()}

))}
); } export function WebAppMantine() { const [page, setPage] = useState("Dashboard"); const [theme, setTheme] = useState(MANTINE_THEMES[0]); const NAV: { label: Page; icon: string }[] = [ { label: "Dashboard", icon: "▦" }, { label: "Users", icon: "◎" }, { label: "Settings", icon: "⚙" }, ]; return (
Acme Inc
{NAV.map(({ label, icon }) => ( ))}
{page}
{page === "Dashboard" && } {page === "Users" && } {page === "Settings" && }
); } function HeroUIDashboard() { return (
{["Revenue","Users","Conversion"].map((label,i)=>(

{label}

{["$12,400","2,841","18.2%"][i]}

+{[12,8,3][i]}% this month

))}
Revenue
{[40,60,45,75,65,85,70,90,55,80,75,95].map((h,i)=>(
))}
Recent activity
{TABLE_ROWS.slice(0,3).map(r=>(

{r.name}

{r.email}

{r.status}
))}
); } function HeroUIUsers() { return (
Team members
{["Member","Role","Status","Joined",""].map(h=>)}{TABLE_ROWS.map(r=>( ))}
{h}

{r.name}

{r.email}

{r.role} {r.status} {r.date}
); } function HeroUISettings() { return (
Profile
{[{l:"Workspace name",v:"Acme Inc"},{l:"Slug",v:"acme-inc"},{l:"Email",v:"admin@acme.com"}].map(f=>(
))}
Notifications
{["Email digests","Push notifications","Security alerts","Product updates"].map((label,i)=>(

{label}

))}
); } export function WebAppHeroUI() { const [page, setPage] = useState("Dashboard"); const [theme, setTheme] = useState(HEROUI_THEMES[0]); const NAV: { label: Page; icon: string }[] = [ { label: "Dashboard", icon: "▦" }, { label: "Users", icon: "◎" }, { label: "Settings", icon: "⚙" }, ]; return (
Acme Inc
{NAV.map(({ label, icon }) => ( ))}
{page}
{page === "Dashboard" && } {page === "Users" && } {page === "Settings" && }
); } function TremorDashboard() { return (
{[{l:"Revenue",v:"$12,400",c:"#2563eb",bg:"#dbeafe",pct:65},{l:"Users",v:"2,841",c:"#7c3aed",bg:"#ede9fe",pct:48},{l:"Conversion",v:"18.2%",c:"#059669",bg:"#d1fae5",pct:72}].map(item=>(

{item.l}

{item.v}

))}

Revenue over time

{[40,65,55,80,70,90,75,85,60,95,80,100].map((h,i)=>(
))}
{["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"].map(m=>{m})}
{TABLE_ROWS.slice(0,3).map(r=>(
{r.name} {r.role}
))}
); } function TremorUsers() { return (
{[{l:"Total",v:"2,841",c:"#2563eb"},{l:"Active",v:"1,940",c:"#059669"},{l:"Pending",v:"647",c:"#d97706"},{l:"Inactive",v:"254",c:"#6b7280"}].map(s=>(

{s.l}

{s.v}

))}
All users
{["Name","Role","Status","Date"].map(h=>)}{TABLE_ROWS.map(r=>( ))}
{h}
{r.name} {r.role}
{r.status}
{r.date}
); } function TremorSettings() { return (

Workspace

{[{l:"Name",v:"Acme Inc"},{l:"Domain",v:"acme.com"},{l:"Timezone",v:"UTC-8"}].map(f=>(
))}

Alerts

{["Email digests","Anomaly alerts","Weekly report","API warnings"].map((label,i)=>(

{label}

))}
); } export function WebAppTremor() { const [page, setPage] = useState("Dashboard"); const [theme, setTheme] = useState(TREMOR_THEMES[0]); const NAV: { label: Page; icon: string }[] = [ { label: "Dashboard", icon: "▦" }, { label: "Users", icon: "◎" }, { label: "Settings", icon: "⚙" }, ]; return (
Acme Inc
{NAV.map(({ label, icon }) => ( ))}
{page}
{page === "Dashboard" && } {page === "Users" && } {page === "Settings" && }
); } // --------------------------------------------------------------------------- // MARKETING scaffolds // --------------------------------------------------------------------------- export function MarketingDaisy() { return (
✦ New — v2.0 is here

Build faster,
ship smarter

The all-in-one platform that helps teams build, launch, and scale their products.

{[{icon:"⚡",title:"Lightning fast",desc:"Deploy in seconds, not hours"},{icon:"🔒",title:"Secure by default",desc:"Enterprise-grade security built in"},{icon:"📈",title:"Scales with you",desc:"From zero to millions of users"}].map(f=>(
{f.icon}

{f.title}

{f.desc}

))}
); } export function MarketingHeroUI() { return (
🚀 Just launched — v2.0

Build faster,
ship smarter

The all-in-one platform for teams that move fast.

{["#ff5f56","#ffbd2e","#27c93f"].map(c=>
)}
{["Revenue","Users","Growth","Churn"].map((m,i)=>

{m}

{["$12k","2.8k","+24%","2.1%"][i]}

)}
); } export function MarketingAceternity() { return (
✦ Open source · 12k GitHub stars

Build the future
of the web

Beautifully crafted components built with Tailwind CSS and Framer Motion.

{["Animated","Accessible","Open source"].map((f,i)=>(

{f}

Built for production

))}
); } export function MarketingTailwind() { return (
Now in public beta

The platform
built for scale

Everything your team needs to build, deploy, and monitor production applications.

{["99.9% uptime SLA","10ms avg latency","SOC2 compliant","GDPR ready"].map(f=>(
{f}
))}
); } // --------------------------------------------------------------------------- // ADMIN scaffolds // --------------------------------------------------------------------------- export function AdminMantine() { return ; } export function AdminShadcn() { return ; } export function AdminTremor() { return ; } // --------------------------------------------------------------------------- // MOBILE scaffolds // --------------------------------------------------------------------------- function MobileFrame({ children }: { children: React.ReactNode }) { return (
{children}
); } export function MobileNativewind() { return (

Good morning

Dashboard

{[{l:"Revenue",v:"$4.2k"},{l:"Users",v:"184"}].map(c=>(

{c.l}

{c.v}

))}
{["Fix login bug","Update pricing","Review PR #42"].map((t,i)=>(

{t}

))}
{["Home","Projects","Chat","Profile"].map((l,i)=>(
{l}
))}
); } export function MobileGluestack() { return (

Dashboard

{[{l:"Revenue",v:"$4.2k",c:"#1976d2"},{l:"Users",v:"184",c:"#7b1fa2"}].map(c=>(

{c.l}

{c.v}

))}
{["Fix login bug","Update pricing","Review PR #42"].map((t,i)=>(

{t}

))}
{["Home","Tasks","Chat","Profile"].map((l,i)=>(
{l}
))}
); } // --------------------------------------------------------------------------- // EMAIL scaffolds // --------------------------------------------------------------------------- export function EmailReactEmail() { return (
Acme

Welcome to Acme! 🎉

Hi Alice, thanks for signing up. Your account is ready and you can start building right away.

Your account details

{["Plan: Starter","Workspace: alice-workspace","Status: Active"].map(d=>(

{d}

))}

If you have any questions, reply to this email or visit our help center. We're here to help.

Acme Inc · 123 Main St · San Francisco CA · Unsubscribe

); } // --------------------------------------------------------------------------- // DOCS scaffolds // --------------------------------------------------------------------------- export function DocsNextra() { return (

Getting Started

{["Introduction","Installation","Quick Start"].map((item,i)=>(
{item}
))}

Components

{["Button","Card","Input","Modal","Table"].map(item=>(
{item}
))}

API Reference

{["REST API","Webhooks"].map(item=>(
{item}
))}
Docs/Getting Started/Introduction

Introduction

Acme UI is a collection of re-usable components that you can copy and paste into your web apps. Built with Radix UI and Tailwind CSS.

$ npm install acme-ui

Key features

{["Accessible","Customisable","Open source","TypeScript ready"].map(f=>(
{f}
))}
); } export function DocsShadcnCustom() { return (
Acme Docs
{[{section:"Guides",items:["Introduction","Installation","Theming"]},{section:"Components",items:["Button","Input","Select","Dialog"]}].map(g=>(

{g.section}

{g.items.map((item,i)=>(
{item}
))}
))}

Introduction

A set of beautifully designed components built with Radix UI and Tailwind CSS.

bash

npx shadcn@latest init

{["Button","Card","Input","Badge"].map(c=>(

{c}

View component →

))}
); } // --------------------------------------------------------------------------- // Registry — maps surface+theme to scaffold component // --------------------------------------------------------------------------- export const SCAFFOLD_REGISTRY: Record> = { "web-app": { "shadcn": WebAppShadcn, "mantine": WebAppMantine, "hero-ui": WebAppHeroUI, "tremor": WebAppTremor, }, "marketing": { "daisy-ui": MarketingDaisy, "hero-ui": MarketingHeroUI, "aceternity": MarketingAceternity, "tailwind-only": MarketingTailwind, }, "admin": { "mantine": AdminMantine, "shadcn": AdminShadcn, "tremor": AdminTremor, }, "mobile": { "nativewind": MobileNativewind, "gluestack": MobileGluestack, }, "email": { "react-email": EmailReactEmail, }, "docs": { "nextra": DocsNextra, "shadcn": DocsShadcnCustom, }, };