Templates

Pre-built prompt templates for common UI patterns. Use them directly or as starting points for customization.

Marketing

TemplateDescriptionPrompt
hero-gradientHero with gradient background, heading, subtitle, CTAgenerate --template hero-gradient
pricing-toggle3-tier pricing with monthly/annual togglegenerate --template pricing-toggle
feature-gridFeature showcase with icon cards in 3-column gridgenerate --template feature-grid
testimonialsCarousel of customer testimonials with avatarsgenerate --template testimonials

Application

TemplateDescriptionPrompt
dashboard-statsStats overview with KPI cards and sparklinesgenerate --template dashboard-stats
data-tableSortable table with pagination and searchgenerate --template data-table
auth-formLogin/signup form with validation statesgenerate --template auth-form
settings-panelSettings page with sections, toggles, and savegenerate --template settings-panel

Navigation

TemplateDescriptionPrompt
navbar-responsiveTop nav with logo, links, mobile hamburgergenerate --template navbar-responsive
sidebar-navCollapsible sidebar with sections and iconsgenerate --template sidebar-nav
command-paletteCmd+K search modal with fuzzy matchinggenerate --template command-palette

Using Templates with Custom Tokens

import { generate } from 'magicaldope';

const hero = await generate({
  template: "hero-gradient",
  tokens: "./my-brand-tokens.json",
  overrides: {
    heading: "Ship faster with AI",
    cta: "Start free trial",
  },
});