apex-ui-kit 2.12.1 → 2.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli/index.js CHANGED
@@ -111,7 +111,6 @@ const componentMap = {
111
111
  "pixel-transition": "PixelTransition",
112
112
  "folder": "Folder",
113
113
  "bounce-cards": "BounceCards",
114
- "card-swap-3d": "CardSwap3D",
115
114
  "gooey-nav": "GooeyNav",
116
115
  "liquid-blob-3d": "LiquidBlob3D",
117
116
  "particle-morph": "ParticleMorph",
@@ -177,13 +176,99 @@ async function importedPackages(dir) {
177
176
  await walk(dir);
178
177
  return [...found];
179
178
  }
179
+ // ---- AI agent skill -------------------------------------------------------
180
+ // `npx apex-ui-kit skill [--ai claude,cursor,...|all]` installs the ApexUI skill
181
+ // where each agent looks for it. Skill-aware agents get the whole folder; the
182
+ // rest get one rules file that points to the reference files in .apexui/skill.
183
+ const skillRoot = path.join(__dirname, "..", "skill", "apexui");
184
+ const SKILL_DESC = "Build premium, responsive, secure websites and mobile-first web apps in React with ApexUI components.";
185
+ const AGENTS = {
186
+ claude: { label: "Claude Code", dir: ".claude/skills/apexui" },
187
+ antigravity: { label: "Google Antigravity", dir: ".agents/skills/apexui" },
188
+ cursor: { label: "Cursor", file: ".cursor/rules/apexui.mdc", head: `---\ndescription: ${SKILL_DESC}\nalwaysApply: false\n---\n\n` },
189
+ windsurf: { label: "Windsurf", file: ".windsurf/rules/apexui.md", head: `---\ntrigger: model_decision\ndescription: ${SKILL_DESC}\n---\n\n` },
190
+ copilot: { label: "GitHub Copilot", file: ".github/instructions/apexui.instructions.md", head: `---\napplyTo: "**"\n---\n\n` },
191
+ codex: { label: "Codex, ChatGPT agents and other AGENTS.md tools", file: "AGENTS.md", section: true },
192
+ gemini: { label: "Gemini CLI", file: "GEMINI.md", section: true },
193
+ };
194
+ async function installSkill(args) {
195
+ if (!(await fs.pathExists(path.join(skillRoot, "SKILL.md")))) {
196
+ console.log(chalk.red("❌ Internal error: skill files not found in the package."));
197
+ return;
198
+ }
199
+ const flag = args.find((a) => a.startsWith("--ai"));
200
+ let picked = [];
201
+ if (flag) {
202
+ const value = flag.includes("=") ? flag.split("=")[1] : args[args.indexOf(flag) + 1] ?? "";
203
+ picked = value === "all" ? Object.keys(AGENTS) : value.split(",").map((s) => s.trim().toLowerCase()).filter(Boolean);
204
+ }
205
+ else {
206
+ const { agents } = await prompts({
207
+ type: "multiselect",
208
+ name: "agents",
209
+ message: "🤖 Install the ApexUI skill for which AI agents?",
210
+ choices: Object.entries(AGENTS).map(([value, a]) => ({ title: a.label, value, selected: value === "claude" })),
211
+ hint: "Space to select, Enter to confirm",
212
+ });
213
+ picked = agents ?? [];
214
+ }
215
+ const unknown = picked.filter((p) => !AGENTS[p]);
216
+ if (unknown.length) {
217
+ console.log(chalk.red(`❌ Unknown agent: ${unknown.join(", ")}. Use: ${Object.keys(AGENTS).join(", ")} or all.`));
218
+ return;
219
+ }
220
+ if (!picked.length) {
221
+ console.log(chalk.yellow("Nothing selected."));
222
+ return;
223
+ }
224
+ const cwd = process.cwd();
225
+ const raw = await fs.readFile(path.join(skillRoot, "SKILL.md"), "utf8");
226
+ const body = raw.replace(/^---[\s\S]*?---\s*/, "").replace(/`references\//g, "`.apexui/skill/references/");
227
+ let sharedCopied = false;
228
+ for (const key of picked) {
229
+ const a = AGENTS[key];
230
+ if (a.dir) {
231
+ const dest = path.join(cwd, a.dir);
232
+ await fs.ensureDir(dest);
233
+ await fs.copy(skillRoot, dest, { overwrite: true });
234
+ console.log(chalk.green(`✅ ${a.label}: ${a.dir}/`));
235
+ continue;
236
+ }
237
+ if (!sharedCopied) {
238
+ await fs.copy(path.join(skillRoot, "references"), path.join(cwd, ".apexui", "skill", "references"), { overwrite: true });
239
+ sharedCopied = true;
240
+ }
241
+ const file = path.join(cwd, a.file);
242
+ await fs.ensureDir(path.dirname(file));
243
+ if (a.section) {
244
+ const block = `<!-- apexui:start -->\n${body.trim()}\n<!-- apexui:end -->\n`;
245
+ const old = (await fs.pathExists(file)) ? await fs.readFile(file, "utf8") : "";
246
+ const next = old.includes("<!-- apexui:start -->")
247
+ ? old.replace(/<!-- apexui:start -->[\s\S]*?<!-- apexui:end -->\n?/, block)
248
+ : `${old}${old && !old.endsWith("\n") ? "\n" : ""}${old ? "\n" : ""}${block}`;
249
+ await fs.writeFile(file, next);
250
+ }
251
+ else {
252
+ await fs.writeFile(file, `${a.head ?? ""}${body}`);
253
+ }
254
+ console.log(chalk.green(`✅ ${a.label}: ${a.file}`));
255
+ }
256
+ if (sharedCopied)
257
+ console.log(chalk.gray(" Reference files: .apexui/skill/references/"));
258
+ console.log(chalk.cyan("\nNow ask your agent, for example: \"Build a premium, responsive landing page for my app with ApexUI.\""));
259
+ }
180
260
  async function main() {
181
261
  const args = process.argv.slice(2);
182
262
  const command = args[0];
183
263
  const rawInput = args[1];
264
+ if (command === "skill") {
265
+ await installSkill(args.slice(1));
266
+ return;
267
+ }
184
268
  if (command !== "add" || !rawInput) {
185
269
  console.log(chalk.yellow("Usage:"));
186
270
  console.log(" npx apex-ui-kit add <component-name>");
271
+ console.log(" npx apex-ui-kit skill [--ai claude,antigravity,cursor,windsurf,copilot,codex,gemini | all]");
187
272
  return;
188
273
  }
189
274
  const input = rawInput.toLowerCase();
@@ -0,0 +1,91 @@
1
+ ---
2
+ name: apexui
3
+ description: Build premium, responsive, secure websites and mobile-first web apps in React with ApexUI animated components (Tailwind CSS, Framer Motion, GSAP, three.js). Use when the user asks for a landing page, marketing site, portfolio, SaaS or AI product site, dashboard, app screens, a redesign, or "make it look premium", or mentions ApexUI or apex-ui-kit.
4
+ ---
5
+
6
+ # ApexUI: premium sites and apps with AI
7
+
8
+ You design and build like a senior product designer and front-end engineer. Every result must be:
9
+
10
+ 1. **Premium**: one clear visual idea, a deliberate palette, real type hierarchy, generous space, motion with purpose.
11
+ 2. **Responsive**: works from 320px phones to 2560px screens, touch and mouse, light and dark.
12
+ 3. **Secure**: no secrets in the browser, no unsafe HTML, safe links, safe forms. Follow `references/security.md` every time.
13
+ 4. **Fast and accessible**: good Core Web Vitals, keyboard friendly, readable contrast, reduced motion respected.
14
+
15
+ ApexUI gives you 116 free animated React components that you add one by one with `npx apex-ui-kit add <name>`. The source lands in the project, so you can read and adapt it.
16
+
17
+ ## Reference files (read only what the task needs)
18
+
19
+ | File | Read it when |
20
+ | --- | --- |
21
+ | `references/components.md` | Choosing components. Every component, its CLI name and what it is for. |
22
+ | `references/recipes.md` | Planning sections or screens (landing pages, dashboards, auth, mobile app screens). |
23
+ | `references/design-system.md` | Picking palette, fonts, spacing, radius, shadows and motion tokens. |
24
+ | `references/responsive-mobile.md` | Layout, breakpoints, touch, safe areas, PWA. |
25
+ | `references/security.md` | Always, before you ship anything. |
26
+ | `references/checklist.md` | Last step, before you say the work is done. |
27
+
28
+ ## Workflow
29
+
30
+ ### 1. Understand the brief (ask at most 3 short questions, only if the answer changes the build)
31
+ - What is it (product, audience, goal of the page or app)?
32
+ - Platform: website, mobile-first web app, or installable PWA?
33
+ - Brand: existing colours, logo, tone (playful, bold, calm, technical, luxury)?
34
+
35
+ If the user gives no brand, choose one direction from `references/design-system.md` and say which one you chose.
36
+
37
+ ### 2. Plan before code
38
+ Write a short plan: the sections (or screens) in order, the ApexUI component for each, the palette and font pair. Use `references/recipes.md`. Prefer 1 hero effect plus 2 to 4 supporting effects per page. Too many effects look cheap.
39
+
40
+ ### 3. Set up the project
41
+ For a new project use Vite + React + Tailwind CSS v4:
42
+
43
+ ```bash
44
+ npm create vite@latest my-app -- --template react
45
+ cd my-app
46
+ npm install
47
+ npm install tailwindcss @tailwindcss/vite
48
+ ```
49
+
50
+ Add the Tailwind plugin to `vite.config.js` and `@import "tailwindcss";` at the top of `src/index.css`. Existing Next.js or Vite projects work too; components are plain React.
51
+
52
+ ### 4. Add ApexUI components
53
+ ```bash
54
+ npx apex-ui-kit add <cli-name>
55
+ ```
56
+ - The CLI copies the component into `ApexUI-Kit/<ComponentFolder>/` in the folder you choose and installs only the packages it imports.
57
+ - Import it with a relative path, for example `import HyperCard from "./ApexUI-Kit/HyperCard/HyperCard.jsx";`.
58
+ - Read the component file before using it: props have defaults and comments at the top explain the behaviour.
59
+ - Components that use browser APIs (canvas, WebGL, window) must render on the client. In Next.js put `"use client"` at the top of the file that uses them.
60
+
61
+ ### 5. Build
62
+ - Mobile first. Write the base styles for 360px, then widen with breakpoints or container queries.
63
+ - Use semantic HTML: `header`, `nav`, `main`, `section` with headings, `footer`, real `button` and `a` elements.
64
+ - Put design tokens in CSS variables (see `references/design-system.md`) so light and dark themes stay consistent.
65
+ - Keep components self-contained and copy-paste friendly: props for content, no hidden global state.
66
+ - Animate only `transform` and `opacity`. Never animate `width`, `height`, `top` or `left` for movement.
67
+ - Images: correct `width`/`height`, `loading="lazy"` below the fold, modern formats, real `alt` text.
68
+
69
+ ### 6. Secure it
70
+ Go through `references/security.md`. The non-negotiables:
71
+ - No API keys, tokens or secrets in front-end code or in `VITE_`/`NEXT_PUBLIC_` variables. Those are public.
72
+ - Never pass user content to `dangerouslySetInnerHTML` without sanitising it.
73
+ - External links: `target="_blank"` always with `rel="noopener noreferrer"`. Block `javascript:` URLs.
74
+ - Validate forms on the client for UX and on the server for safety.
75
+ - Set security headers when you control hosting (example in `references/security.md`).
76
+
77
+ ### 7. Verify
78
+ Run `references/checklist.md`. Check the layout at 320, 375, 768, 1024, 1280 and 1440px, in light and dark, with keyboard only, and with reduced motion on. Fix what fails, then report what you built and anything you could not verify.
79
+
80
+ ## Quality bar (what "premium" means here)
81
+ - One accent colour used with restraint; neutrals do most of the work.
82
+ - Headlines large and tight (`tracking-tight`, line-height 1 to 1.1); body text 16 to 18px with line-height 1.6.
83
+ - Consistent radius scale and spacing scale; nothing placed by eye.
84
+ - Real content: specific headlines, believable numbers, no lorem ipsum, no em dashes in UI copy.
85
+ - Motion: 150 to 300ms for UI feedback, 400 to 900ms for entrances, springs for drag and hover.
86
+ - Every interactive element has hover, focus-visible, active and disabled states.
87
+
88
+ ## Never
89
+ - Never invent ApexUI components or props. Check `references/components.md` and the component source.
90
+ - Never paste secrets into code, logs, commits or chat output.
91
+ - Never ship a page you have not checked at phone width.
@@ -0,0 +1,37 @@
1
+ # Pre-delivery checklist
2
+
3
+ Go through every line. Fix what fails. In your final message, list anything you could not check.
4
+
5
+ ## Design
6
+ - [ ] One palette and one font pair, used through tokens (no stray hex values).
7
+ - [ ] Clear hierarchy: one H1, section titles, readable body (16px or more, line-height about 1.6).
8
+ - [ ] One hero effect, 2 to 4 supporting effects at most per page.
9
+ - [ ] Real copy, no lorem ipsum, no em dashes in UI text, no broken or placeholder images.
10
+ - [ ] Hover, focus-visible, active and disabled states on every control.
11
+
12
+ ## Responsive
13
+ - [ ] Checked at 320, 375, 768, 1024, 1280 and 1440px; no horizontal page scroll.
14
+ - [ ] Nav collapses cleanly; menu opens and closes smoothly on a phone.
15
+ - [ ] Tap targets at least 44px; nothing important depends on hover.
16
+ - [ ] Safe-area padding on fixed top and bottom bars.
17
+ - [ ] Light and dark themes both correct (text contrast, borders, images).
18
+
19
+ ## Performance
20
+ - [ ] Only `transform`/`opacity` animate; no layout thrash while scrolling.
21
+ - [ ] Heavy sections and below-the-fold images load lazily; WebGL pauses off screen.
22
+ - [ ] Fonts: only the weights used, `display=swap`.
23
+ - [ ] Lighthouse on mobile: Performance 90+, CLS under 0.1.
24
+
25
+ ## Accessibility
26
+ - [ ] Keyboard only: every action reachable, focus always visible, no traps.
27
+ - [ ] Icon-only buttons have `aria-label`; menus use `aria-expanded`; images have `alt`.
28
+ - [ ] `prefers-reduced-motion` turns off large movement.
29
+ - [ ] Colour contrast at least 4.5:1 for text.
30
+
31
+ ## Security
32
+ - [ ] Everything in `security.md` section 9 passes.
33
+
34
+ ## Hand-off
35
+ - [ ] `npm run build` succeeds with no errors.
36
+ - [ ] README: how to run, how to change content, which ApexUI components are used.
37
+ - [ ] `.env.example` lists every variable with no real values.
@@ -0,0 +1,174 @@
1
+ # Components
2
+
3
+ 116 ApexUI components. Add one with `npx apex-ui-kit add <cli-name>`; it lands in `ApexUI-Kit/<Folder>/`. Live demos and props: https://apex-ui.in/components/<page>.
4
+ Read the component source before using it: the props, their defaults and notes are at the top of the file.
5
+
6
+ ## Backgrounds
7
+
8
+ | Component | CLI name | What it is |
9
+ | --- | --- | --- |
10
+ | BluePrint Background | `blueprint-background` | An animated blueprint-style grid background with interactive hover effects. |
11
+ | Kinetic Threads Background | `kinetic-threads-background` | A generative background of flowing, animated threads. |
12
+ | Lens Flare Background | `lens-flare-background` | An animated lens flare that adds a cinematic touch to any hero. |
13
+ | Luminous Particle Ocean | `luminous-particle-ocean` | A 3D ocean of glowing particles for immersive backgrounds. |
14
+ | Orbs Background | `orbs-background` | Floating orbs that drift and react to the pointer. |
15
+ | Rain Background | `rain-background` | Animated rainfall with collision detection. |
16
+ | Ripple Background | `ripple-background` | Soft, generative ripples that spread across the canvas. |
17
+ | Smoke Background | `smoke-background` | A WebGL smoke simulation with dynamic lighting. |
18
+ | Dot Wave Background | `dot-wave-background` | A grid of dots with a rolling wave of color that reacts to the pointer. |
19
+ | Liquid Gradient | `liquid-gradient` | A flowing four-color mesh gradient with film grain, drawn by one tiny OGL shader. |
20
+ | Aurora Background | `aurora-background` | Drifting northern-light curtains drawn by a light WebGL shader. |
21
+ | Retro Grid 3D | `retro-grid-3d` | A synthwave three.js landscape with scrolling hills and a striped sun. |
22
+ | Galaxy 3D | `galaxy-3d` | A turning three.js spiral galaxy with pointer parallax. |
23
+ | Warp Tunnel | `warp-tunnel` | A WebGL hyperspace tunnel that bends to the pointer; hold to boost. |
24
+ | Sunrise Background | `sunrise-background` | A WebGL sun rising between two mountain ranges, with rays, mist and rim light. |
25
+ | Horizon Glow | `horizon-glow` | A soft WebGL light rising from the bottom edge into a deep sky, for hero sections. |
26
+ | Dither Waves | `dither-waves` | Flowing waves as two-tone dithered pixel art in WebGL, with pointer ripples. |
27
+
28
+ ## Text & Motion
29
+
30
+ | Component | CLI name | What it is |
31
+ | --- | --- | --- |
32
+ | Accordion Marquee | `accordion-marquee` | An interactive accordion with a smooth marquee effect on hover. |
33
+ | Beam Bar | `beam-bar` | An animated beam bar with a pulsing light for loading states and dashboards. |
34
+ | Hover Text | `hover-text` | Interactive text hover effects that bring headings to life. |
35
+ | Scroll Marquee | `scroll-marquee` | Text and card marquees whose speed follows the scroll. |
36
+ | Rolling Counter | `rolling-counter` | An odometer-style number whose digit wheels roll to every new value. |
37
+ | Scramble Text | `scramble-text` | Text that decrypts letter by letter on view, on hover or on a loop. |
38
+ | Blur Reveal Text | `blur-reveal-text` | Words rise out of a blur one after another as they scroll into view. |
39
+ | Flip Clock | `flip-clock` | Split-flap digits for countdowns, timers and clocks. |
40
+ | Typewriter Text | `typewriter-text` | Types, pauses and deletes rotating phrases with a blinking caret. |
41
+ | Extruded Text | `extruded-text` | Chunky 3D layered letters that tilt toward the pointer. |
42
+ | Mask View | `mask-view` | Reveal content through a mask: a text window onto an image, a spotlight, or glass you wipe clear. |
43
+ | Shiny Text | `shiny-text` | A band of light sweeps across the text on a loop, like light catching metal. |
44
+ | Glitch Text | `glitch-text` | Text that tears into shifted color slices like a broken signal. |
45
+ | Rotating Text | `rotating-text` | A headline whose last word swaps letter by letter inside a resizing pill. |
46
+ | Circular Text | `circular-text` | Text wrapped around a spinning circle that reacts to hover. |
47
+ | Proximity Text | `proximity-text` | Letters swell, lift and light up as the pointer gets close. |
48
+ | True Focus | `true-focus` | One sharp word at a time, framed by brackets that glide between words. |
49
+ | 3D Text Ring | `text-ring-3d` | Letters on a spinning ring in real 3D, drag to throw it around. |
50
+ | Particle Text | `particle-text` | Text built from canvas particles that fly in, dodge the pointer and burst on click. |
51
+ | Crossed Marquee | `crossed-marquee` | Two tilted tech-stack bands crossing like an X that react to page scroll. |
52
+
53
+ ## Cards
54
+
55
+ | Component | CLI name | What it is |
56
+ | --- | --- | --- |
57
+ | Cards | `basic-card`, `meteor-card` | Basic and meteor-shower cards for showcasing content with motion. |
58
+ | Card Stack | `card-stack` | A stack of cards that cycles automatically and pauses on hover. |
59
+ | Glare Card | `glare-card` | A card with a reflective glare that follows the user's cursor. |
60
+ | Hyper Card | `hyper-card` | A futuristic card with a starfield background and warp-speed hover. |
61
+ | Parallax Card | `parallax-card` | A card with a layered 3D parallax effect. |
62
+ | Profile | `flip-profile`, `parallax-profile`, `profile-card` | Profile cards in four styles, flip, parallax, a tilting card and an ID badge on a ribbon. |
63
+ | Testimonials | `testimonials` | A testimonials section with smooth transitions between quotes. |
64
+ | Spotlight Grid | `spotlight-grid` | A bento grid of cards sharing one pointer spotlight across borders and surfaces. |
65
+ | Pricing Cards | `pricing-cards` | Plans with a monthly / yearly switch, sliding prices and a glowing featured plan. |
66
+ | Swipe Cards | `swipe-cards` | A deck you swipe left or right with tilt, LIKE / NOPE stamps and undo. |
67
+ | Holo Card | `holo-card` | A collectible card that tilts in 3D with a holographic foil and floating layers. |
68
+ | Iso Stack | `iso-stack` | Isometric 3D layers that fan open to show each label. |
69
+ | Pixel Transition | `pixel-transition` | A card that dissolves into pixels to reveal its other side. |
70
+ | Folder | `folder` | A folder that opens and fans its papers out toward the pointer. |
71
+ | Bounce Cards | `bounce-cards` | A fanned hand of photo cards that bounce in and make room on hover. |
72
+ | Distortion Image | `distortion-image` | A WebGL image that ripples and splits into RGB fringes under the pointer. |
73
+ | Scroll Stack | `scroll-stack` | Cards that pin and pile up as you scroll, shrinking and dimming into depth. |
74
+ | Image Accordion | `image-accordion` | Image panels that open wide on hover and stack vertically on phones. |
75
+
76
+ ## Navigation
77
+
78
+ | Component | CLI name | What it is |
79
+ | --- | --- | --- |
80
+ | Nav DropDown | `nav-dropdown` | A floating navbar with one dropdown panel that morphs between menus. |
81
+ | Nav Menu | `nav-menu` | Navigation with an animated active indicator. |
82
+ | Theme Toggle | `theme-toggle` | A light/dark switch with view-transition reveal animations. |
83
+ | Magnify Dock | `magnify-dock` | A macOS-style glass dock whose icons swell toward the pointer. |
84
+ | Sidebar Nav | `sidebar-nav` | An app sidebar that collapses to an icon rail, with a sliding active pill and groups. |
85
+ | Animated Tabs | `animated-tabs` | Tabs with a sliding pill, underline or segmented indicator and sliding panels. |
86
+ | Floating Navbar | `floating-navbar` | A glassy responsive navbar with a hover pill, hide-on-scroll and an animated mobile menu. |
87
+ | Gooey Nav | `gooey-nav` | A liquid active pill that bursts droplets between links. |
88
+ | Radial Menu | `radial-menu` | A round button that fans its actions out in a circle or an arc. |
89
+ | Command Palette | `command-palette` | A ⌘K search palette with fuzzy matching and a sliding keyboard highlight. |
90
+ | Theme Switcher | `theme-switcher` | Eight colour themes with a circle reveal from the swatch you click. |
91
+
92
+ ## Buttons
93
+
94
+ | Component | CLI name | What it is |
95
+ | --- | --- | --- |
96
+ | Animated Buttons | `animated-button`, `hold-to-confirm` | Seven button feels, shine, fill, border beam, 3D press, loading, ripple and arrow. |
97
+ | Animated Switches | `animated-switch` | Toggles with personality, classic, icon, day-to-night and neon. |
98
+ | Star Border | `star-border` | A button with points of light sliding along its edges. |
99
+ | Magnetic Button | `magnetic-button` | A button that leans toward the pointer with a layered label and a tracking glow. |
100
+
101
+ ## Interactive
102
+
103
+ | Component | CLI name | What it is |
104
+ | --- | --- | --- |
105
+ | Avatar | `avatar` | Display user avatars on their own or as an animated, stacked group. |
106
+ | Carousel | `carousel`, `parallax-carousel`, `drag-carousel` | Smooth, customizable carousels for showcasing images or content. |
107
+ | Edge Glow Form | `edge-glow-form` | A form container that emits a soft gradient glow from its edges. |
108
+ | Pointer Follower | `pointer-follower` | A pointer that follows the cursor and reveals content as it moves. |
109
+ | ToolTip | `tooltip` | Animated tooltips with smooth, physics-based positioning. |
110
+ | Receipt Printer | `receipt-printer` | A thermal printer that processes a payment and feeds a receipt out line by line. |
111
+ | Dynamic Island | `dynamic-island` | A black capsule that morphs between music, calls, timers and notifications. |
112
+ | 3D Carousel | `3d-carousel`, `webgl-carousel` | Cards on a ring that spins in 3D, a light CSS ring or a full 360° WebGL ring. |
113
+ | Magnetic Cursor | `magnetic-cursor` | A dot-and-ring cursor that wraps buttons, labels images and pulls magnetic elements. |
114
+ | FAQ Accordion | `faq-accordion` | Questions that open smoothly with a plus that turns into a cross. |
115
+ | Toast Stack | `toast-stack` | Stacked notifications that fan out on hover and swipe away. |
116
+ | Cursor Trail | `cursor-trail` | A tail that follows the mouse, comet, rainbow, dots, ribbon, sparkles or ghost rings. |
117
+ | Image Compare | `image-compare` | A before / after slider you drag, click or move with the keyboard. |
118
+ | Cube Gallery | `cube-gallery` | Images on a 3D cube you drag, click or arrow-key around. |
119
+ | Flip Book | `flip-book` | A 3D book whose pages turn around the spine. |
120
+ | Click Spark | `click-spark` | Every click throws a ring of sparks from the pointer. |
121
+ | Elastic Slider | `elastic-slider` | A slider whose track stretches like rubber when pulled past the ends. |
122
+ | Stepper | `stepper` | A multi-step flow with filling indicators and sliding step content. |
123
+ | Coverflow 3D | `coverflow-3d` | The classic album-flip view with angled covers and reflections. |
124
+ | Magnet Lines | `magnet-lines` | A grid of lines that all swing to point at the pointer. |
125
+ | Liquid Blob 3D | `liquid-blob-3d` | A glossy three.js blob whose surface flows and ripples toward the pointer. |
126
+ | Particle Morph | `particle-morph` | Thousands of three.js particles that swarm between 3D shapes. |
127
+ | Marquee 3D | `marquee-3d` | A tilted 3D wall of cards with columns scrolling in opposite directions. |
128
+ | Wireframe Knot 3D | `wireframe-knot-3d` | A glowing three.js wireframe shape that turns toward the pointer. |
129
+ | Edge Blur | `edge-blur` | A progressive blur that melts content at the edge of a scrolling area. |
130
+ | Circular Carousel | `circular-carousel` | A WebGL ring of curved image cards you can drag, flick and click. |
131
+ | Arc Gallery | `arc-gallery` | An endless WebGL row of image cards bent along an arc, with drag and wheel. |
132
+ | Glass Lens | `glass-lens` | A WebGL drop of liquid glass that refracts and magnifies an image under the pointer. |
133
+ | Infinite Canvas | `infinite-canvas` | An endless wall of image cards you drag and fling in any direction. |
134
+ | Orbit Icons | `orbit-icons` | Icons circling a center on tilted rings, easing to a stop on hover. |
135
+ | Liquid Glass | `liquid-glass` | iOS style WebGL glass panels that bend, frost and melt together as you drag them. |
136
+ | Fluid Cursor | `fluid-cursor` | A real-time WebGL fluid simulation that trails the cursor with swirling ink. |
137
+ | Sketch Reveal | `sketch-reveal` | A photo turns into a glowing sketch, then burns away into the next one as you scroll. |
138
+
139
+ ## AI
140
+
141
+ | Component | CLI name | What it is |
142
+ | --- | --- | --- |
143
+ | AI Chat | `ai-chat` | A chat window with streaming replies, typing dots and suggestion chips. |
144
+ | AI Prompt Box | `ai-prompt-box` | A prompt input with a glowing border, model picker, attachments and send / stop. |
145
+ | AI Thinking | `ai-thinking` | A shimmering Thinking state with a timer and steps that tick off. |
146
+ | AI Voice Orb | `ai-voice-orb` | A glass voice-assistant orb that reacts to idle, listening, thinking and speaking. |
147
+ | AI Voice Wave | `ai-voice-wave` | Glowing sine waves that swell and burst with the assistant's voice. |
148
+ | AI Voice Bars | `ai-voice-bars` | An equalizer pill of rounded bars for listening, thinking and speaking. |
149
+ | AI Voice Ring | `ai-voice-ring` | A circular audio visualiser with radial bars around a glowing core. |
150
+ | AI Voice Blob | `ai-voice-blob` | A gradient blob whose outline wobbles with the assistant's voice. |
151
+ | AI Response | `ai-response` | A streaming answer with code, sources and copy / regenerate / feedback actions. |
152
+ | AI Model Prompt | `ai-model-prompt` | A prompt composer with a model picker and per-model temperature, tokens and reasoning settings. |
153
+
154
+ ## Loaders
155
+
156
+ | Component | CLI name | What it is |
157
+ | --- | --- | --- |
158
+ | Loading Screens | `loading-screen` | Six loaders, orbit, progress, blocks and three mini games (orb, runner, racing) to play while you wait. |
159
+
160
+ ## Maps
161
+
162
+ | Component | CLI name | What it is |
163
+ | --- | --- | --- |
164
+ | Dot Globe | `dot-globe` | A draggable 3D globe of land dots with pulsing cities and flight arcs. |
165
+ | World Map | `world-map` | A dotted world map with flight connections, live pings or clickable office pins. |
166
+
167
+ ## Picking well
168
+
169
+ - One hero effect per page (a background, a 3D piece or a big text effect). Support it with 2 to 4 quieter pieces.
170
+ - Backgrounds that use WebGL (Aurora, Galaxy 3D, Warp Tunnel, Liquid Gradient, Dither Waves, Horizon Glow, Sunrise) are the heaviest: use one per page, never stack two.
171
+ - Text effects work best on short strings: a headline, a word that rotates, a stat that counts.
172
+ - For product UI (dashboards, settings, forms) prefer calm pieces: Animated Tabs, Sidebar Nav, Stepper, FAQ Accordion, Toast Stack, Command Palette.
173
+ - For mobile app screens: Floating Navbar or Magnify Dock style bottom bars, Swipe Cards, Card Stack, Toast Stack, Animated Switches.
174
+ - AI products: AI Prompt Box or AI Model Prompt for input, AI Thinking and AI Response for output, an AI Voice piece for voice mode.
@@ -0,0 +1,104 @@
1
+ # Design system
2
+
3
+ Pick one palette and one font pair, put them in CSS variables, and use only those tokens. Consistency is what makes a page look premium.
4
+
5
+ ## Palettes
6
+
7
+ Each palette has a dark and a light mode. `accent` is for primary buttons, links and highlights only; `on-accent` is the text colour on top of it. Contrast of `ink` on `bg` and `on-accent` on `accent` passes WCAG AA.
8
+
9
+ | Palette | Mood, best for | Mode | bg | surface | line | ink | muted | accent | on-accent |
10
+ | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
11
+ | Volt | Bold, developer tools, SaaS | dark | #09090b | #131316 | #27272a | #fafafa | #a1a1aa | #a3e635 | #0a0a0a |
12
+ | Volt | | light | #fafafa | #ffffff | #e4e4e7 | #09090b | #52525b | #4d7c0f | #ffffff |
13
+ | Indigo Night | Trustworthy, AI products, fintech | dark | #0b0d17 | #12162a | #23284a | #eef0ff | #9aa3c7 | #818cf8 | #0b0d17 |
14
+ | Indigo Night | | light | #f7f8ff | #ffffff | #e3e6f8 | #0f1229 | #545b80 | #4f46e5 | #ffffff |
15
+ | Ember | Warm, creative studios, food, events | dark | #120c0a | #1c1411 | #33241e | #fff5ef | #c9a99a | #ff6a3d | #1a0d07 |
16
+ | Ember | | light | #fffaf6 | #ffffff | #f1e2d8 | #1f1410 | #7a5a4b | #e8501f | #ffffff |
17
+ | Glacier | Calm, health, productivity | dark | #071114 | #0d1b20 | #1d333a | #ecfbff | #93b4bd | #5eead4 | #04201b |
18
+ | Glacier | | light | #f5fbfc | #ffffff | #dcedf0 | #0b2228 | #4b6b73 | #0f766e | #ffffff |
19
+ | Rose Quartz | Soft luxury, beauty, lifestyle | dark | #140b10 | #1e1118 | #3a2230 | #fff1f6 | #c79bb0 | #f472b6 | #1d0612 |
20
+ | Rose Quartz | | light | #fff7fa | #ffffff | #f6dde8 | #2a1020 | #80586a | #be185d | #ffffff |
21
+ | Graphite Gold | Luxury, finance, architecture | dark | #0c0b09 | #15130f | #2c2820 | #f7f2e8 | #b3a88f | #d4af37 | #15110a |
22
+ | Graphite Gold | | light | #faf8f3 | #ffffff | #ebe5d6 | #1a1712 | #6b6250 | #8a6d12 | #ffffff |
23
+ | Ocean Signal | Clean, B2B, analytics | dark | #06101f | #0c1a30 | #1c2f4d | #eaf2ff | #8fa6c9 | #38bdf8 | #04121f |
24
+ | Ocean Signal | | light | #f6f9fe | #ffffff | #dde7f5 | #0a1a33 | #4e6283 | #0369a1 | #ffffff |
25
+ | Grape Soda | Playful, consumer apps, games | dark | #110a1c | #1a1029 | #33224d | #f6efff | #b3a0d1 | #c084fc | #170a26 |
26
+ | Grape Soda | | light | #fbf8ff | #ffffff | #ebe1f8 | #1d0f33 | #6b5a85 | #7e22ce | #ffffff |
27
+ | Forest | Natural, sustainability, outdoors | dark | #0a110c | #111c14 | #223627 | #eef8f0 | #9bb7a1 | #4ade80 | #06170b |
28
+ | Forest | | light | #f7fbf7 | #ffffff | #dfece2 | #0f2214 | #50685a | #15803d | #ffffff |
29
+ | Mono Paper | Editorial, portfolios, minimal | dark | #0e0e0e | #171717 | #2a2a2a | #f5f5f4 | #a8a29e | #f5f5f4 | #0e0e0e |
30
+ | Mono Paper | | light | #f5f4f0 | #ffffff | #e2e0d9 | #111111 | #5f5c55 | #111111 | #f5f4f0 |
31
+
32
+ ### Using a palette with Tailwind CSS v4
33
+
34
+ ```css
35
+ @import "tailwindcss";
36
+
37
+ :root {
38
+ --bg: #09090b; --surface: #131316; --line: #27272a;
39
+ --ink: #fafafa; --muted: #a1a1aa; --accent: #a3e635; --on-accent: #0a0a0a;
40
+ }
41
+ :root[data-theme="light"] {
42
+ --bg: #fafafa; --surface: #ffffff; --line: #e4e4e7;
43
+ --ink: #09090b; --muted: #52525b; --accent: #4d7c0f; --on-accent: #ffffff;
44
+ }
45
+
46
+ @theme inline {
47
+ --color-bg: var(--bg);
48
+ --color-surface: var(--surface);
49
+ --color-line: var(--line);
50
+ --color-ink: var(--ink);
51
+ --color-muted: var(--muted);
52
+ --color-accent: var(--accent);
53
+ --color-on-accent: var(--on-accent);
54
+ }
55
+
56
+ body { background: var(--bg); color: var(--ink); }
57
+ ```
58
+
59
+ Now `bg-surface`, `text-muted`, `border-line`, `bg-accent text-on-accent` work everywhere. Most ApexUI components take an `accentColor` prop: pass the same accent hex.
60
+
61
+ ## Font pairs (Google Fonts)
62
+
63
+ | Pair | Display (headings) | Text (body) | Feel |
64
+ | --- | --- | --- | --- |
65
+ | Modern tech | Space Grotesk 600 | Inter 400/500 | Developer, SaaS |
66
+ | Sharp editorial | Instrument Serif 400 | Inter 400 | Portfolios, studios |
67
+ | Friendly product | Plus Jakarta Sans 700 | Plus Jakarta Sans 400 | Consumer apps |
68
+ | Bold startup | Sora 700 | DM Sans 400 | AI startups, launches |
69
+ | Luxury | Cormorant Garamond 600 | Manrope 400 | Fashion, hospitality |
70
+ | Geometric clean | Outfit 600 | Outfit 400 | Dashboards, fintech |
71
+ | Playful | Bricolage Grotesque 700 | Nunito Sans 400 | Games, kids, community |
72
+ | Mono accent | Geist 600 | Geist 400 + Geist Mono for labels | Dev tools, docs |
73
+
74
+ Load only the weights you use, with `display=swap`. Use the mono font for small uppercase labels (`text-xs tracking-[0.2em] uppercase`).
75
+
76
+ ## Type scale (fluid)
77
+
78
+ | Role | Size | Line height | Tracking |
79
+ | --- | --- | --- | --- |
80
+ | Hero headline | `clamp(2.5rem, 6vw + 1rem, 5.5rem)` | 1.0 | -0.03em |
81
+ | Section title | `clamp(1.9rem, 3.2vw + 0.8rem, 3.25rem)` | 1.05 | -0.02em |
82
+ | Card title | 1.125 to 1.375rem | 1.25 | -0.01em |
83
+ | Body | 1rem to 1.125rem | 1.6 | 0 |
84
+ | Small, labels | 0.75 to 0.875rem | 1.4 | 0.02em (uppercase: 0.18em) |
85
+
86
+ Keep body text to 60 to 72 characters per line (`max-w-prose` or `max-w-[65ch]`).
87
+
88
+ ## Space, radius, depth
89
+
90
+ - Spacing scale: 4, 8, 12, 16, 24, 32, 48, 64, 96, 128px. Section padding: `py-[clamp(4rem,10vw,8rem)]`. Page gutter: `px-[clamp(1rem,4vw,3rem)]`.
91
+ - Radius scale: 8px (inputs, chips), 12 to 16px (buttons, small cards), 20 to 28px (cards, panels), full (pills, avatars). Pick 3 and reuse them.
92
+ - Shadows on dark: rely on borders (`border-line`) and a soft glow of the accent at 10 to 20% opacity. On light: `0 1px 2px rgb(0 0 0 / .05), 0 12px 32px -12px rgb(0 0 0 / .15)`.
93
+ - Max content width: 72 to 80rem for marketing pages, 90rem for dashboards.
94
+
95
+ ## Motion
96
+
97
+ | Use | Duration | Easing |
98
+ | --- | --- | --- |
99
+ | Hover, press, toggles | 150 to 220ms | `cubic-bezier(0.22, 1, 0.36, 1)` |
100
+ | Menus, popovers, tabs | 200 to 300ms | same, or spring stiffness 400, damping 32 |
101
+ | Section entrances | 500 to 900ms, stagger 60 to 90ms | `cubic-bezier(0.16, 1, 0.3, 1)` |
102
+ | Drag, swipe, magnetic | spring stiffness 150 to 300, damping 18 to 26 | |
103
+
104
+ Respect `prefers-reduced-motion: reduce`: turn off parallax, auto-play and large movement; keep fades.
@@ -0,0 +1,68 @@
1
+ # Recipes
2
+
3
+ Proven section orders for common products, with the ApexUI components that fit each part. Component names match `components.md` (look up the CLI name there). Swap pieces to fit the brand; keep the structure.
4
+
5
+ ## Page skeleton (every marketing page)
6
+
7
+ 1. **Nav**: logo left, 3 to 6 links, one primary CTA right. Floating Navbar (switches to a burger by its own width) or Gooey Nav for a playful brand.
8
+ 2. **Hero**: one promise in 4 to 9 words, one supporting line, one primary and one secondary CTA, proof under it (logos, rating, user count). One hero effect only.
9
+ 3. **Proof**: logo strip (Scroll Marquee, Crossed Marquee) or numbers (Rolling Counter).
10
+ 4. **Features**: 3 to 6 benefits, each with a title that states the outcome. Spotlight Grid, Hyper Card, Iso Stack for "how it fits together".
11
+ 5. **How it works**: 3 steps. Stepper, Scroll Stack, or numbered cards.
12
+ 6. **Showcase**: product shots or work. Image Accordion, Coverflow 3D, Arc Gallery, Image Compare (before/after).
13
+ 7. **Testimonials**: Testimonials, Card Stack, Swipe Cards.
14
+ 8. **Pricing**: Pricing Cards (monthly/yearly toggle, one highlighted plan).
15
+ 9. **FAQ**: FAQ Accordion with 5 to 8 real questions.
16
+ 10. **Final CTA**: repeat the promise, one button. Star Border or Magnetic Button.
17
+ 11. **Footer**: links in 3 to 4 columns, legal, socials, theme toggle.
18
+
19
+ ## SaaS / developer tool
20
+ - Palette: Volt or Ocean Signal. Fonts: Modern tech or Mono accent.
21
+ - Hero: Blueprint Background or Dot Wave Background, headline with Blur Reveal Text, CLI install line in a mono chip.
22
+ - Features: Spotlight Grid; code samples in cards; Command Palette demo for power users.
23
+ - Extras: Animated Tabs to switch between "Code / Preview / Docs".
24
+
25
+ ## AI startup
26
+ - Palette: Indigo Night or Grape Soda. Fonts: Bold startup.
27
+ - Hero: Galaxy 3D, Aurora Background or Horizon Glow; headline with Scramble Text or Rotating Text.
28
+ - Product: AI Prompt Box (input), AI Thinking + AI Response (output), AI Voice Orb for voice mode.
29
+ - Trust: security and privacy section with plain-language bullets.
30
+
31
+ ## Portfolio / creative studio
32
+ - Palette: Mono Paper or Ember. Fonts: Sharp editorial.
33
+ - Hero: big name with Extruded Text, Mask View or Proximity Text; Fluid Cursor or Magnetic Cursor for character.
34
+ - Work: Image Accordion, Infinite Canvas or Arc Gallery; each project opens a case study page.
35
+ - Contact: Edge Glow Form, plus a direct email link.
36
+
37
+ ## E-commerce / product store
38
+ - Palette: Ember, Rose Quartz or Graphite Gold. Fonts: Friendly product or Luxury.
39
+ - Hero: product on Glass Lens or Liquid Glass; price and "Add to bag" visible without scrolling on phones.
40
+ - Browse: Coverflow 3D or Carousel for collections, Swipe Cards for "find your style".
41
+ - Feedback: Toast Stack for "Added to bag"; Folder or Receipt Printer for order summary flourishes.
42
+
43
+ ## App launch / mobile app marketing
44
+ - Palette: Grape Soda, Glacier or Volt. Fonts: Friendly product.
45
+ - Hero: phone mockup with real screens, Liquid Glass accents, store badges.
46
+ - Features: Bounce Cards or Card Stack for screens; Flip Clock or Rolling Counter for launch countdown.
47
+
48
+ ## Event / conference
49
+ - Palette: Ember or Grape Soda. Hero: Warp Tunnel or Retro Grid 3D with Flip Clock countdown. Schedule in Animated Tabs (by day), speakers in Profile cards.
50
+
51
+ ## Dashboard / admin
52
+ - Layout: Sidebar Nav (collapses to an icon rail), top bar with search (Command Palette, Ctrl/Cmd K), Theme Switcher.
53
+ - Content: KPI cards with Rolling Counter, tables with sticky headers, Animated Tabs for views, Toast Stack for results, Stepper for multi-step forms.
54
+ - Keep motion quiet: no background effects behind data.
55
+
56
+ ## Auth screens (sign in, sign up, reset)
57
+ - Split layout on desktop (form left, brand panel right with a background effect), single column on phones.
58
+ - One form per screen, labels above inputs, show/hide password, clear inline errors, "Continue with" providers below.
59
+ - Never store tokens in localStorage; see `security.md`.
60
+
61
+ ## Mobile app screens (mobile-first web app or PWA)
62
+ - **Onboarding**: 3 slides max (Swipe Cards or a Carousel), skip button, progress dots, final CTA.
63
+ - **Home / feed**: sticky top bar (title + 1 action), content cards (Cards, Card Stack), pull-to-refresh optional.
64
+ - **Bottom tab bar**: 3 to 5 tabs, icons with labels, 56 to 64px tall plus safe-area inset, active state clear. Magnify Dock or Gooey Nav styled as a bottom bar.
65
+ - **Detail**: large media, title, primary action in a sticky bottom bar.
66
+ - **Profile / settings**: grouped lists, Animated Switches for toggles, Theme Switcher.
67
+ - **Feedback**: Toast Stack at the top on phones (bottom bars cover the bottom), Dynamic Island style status for long tasks.
68
+ - Touch: every target at least 44 by 44px, swipe actions also available as buttons.
@@ -0,0 +1,50 @@
1
+ # Responsive and mobile
2
+
3
+ ## Principles
4
+ - Mobile first: base styles for about 360px, then add space and columns as the screen widens.
5
+ - Size components by their container, not the screen, when they can sit in different places (cards in a sidebar, a widget in a grid). Use container queries (`@container` and `@sm:`/`@md:` in Tailwind v4) or a ResizeObserver.
6
+ - Fluid everything: `clamp()` for type, padding and gaps, so there are fewer breakpoints to manage.
7
+ - No horizontal scroll on the page, ever. Wide content (tables, code) scrolls inside its own box.
8
+
9
+ ## Breakpoints to test
10
+ 320 (small Android), 375 and 390 (iPhone), 430 (large phones), 768 (tablet portrait), 1024 (tablet landscape, small laptop), 1280, 1440, 1920.
11
+ Laptops at 125% or 150% Windows scaling report about 1100 to 1280px wide and 600 to 720px tall: check that the hero and nav still fit.
12
+
13
+ ## Layout patterns
14
+ - Grids: `grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr))` instead of fixed column counts.
15
+ - Navs: links collapse into a menu when the bar runs out of room; the menu panel animates with transform and opacity only.
16
+ - Heroes: stack text over media on phones; keep the CTA visible in the first screen (`min-height: 100svh` minus the nav).
17
+ - Use `100svh` / `100dvh` instead of `100vh` for full-height mobile sections (the browser bar changes height).
18
+ - Long text: `max-width: 65ch`; avoid text over busy backgrounds without a scrim.
19
+
20
+ ## Touch and input
21
+ - Targets at least 44 by 44px with 8px between them.
22
+ - Hover effects need a touch alternative (tap to reveal, always-visible actions).
23
+ - Use `pointer` media features: `@media (hover: hover) and (pointer: fine)` for hover-only flourishes like magnetic or cursor effects; switch them off on touch.
24
+ - Inputs: correct `type` and `inputmode` (`email`, `tel`, `numeric`), `autocomplete` values, font size 16px or more (iOS zooms below that).
25
+
26
+ ## Safe areas (notches, home indicator)
27
+ ```html
28
+ <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
29
+ ```
30
+ ```css
31
+ .bottom-bar { padding-bottom: max(0.75rem, env(safe-area-inset-bottom)); }
32
+ .top-bar { padding-top: max(0.75rem, env(safe-area-inset-top)); }
33
+ ```
34
+
35
+ ## Installable web app (PWA)
36
+ - `manifest.webmanifest` with `name`, `short_name`, `start_url`, `display: "standalone"`, `theme_color`, `background_color`, icons 192 and 512 (plus a maskable icon).
37
+ - A service worker for offline caching (for Vite: `vite-plugin-pwa`). Cache static assets; never cache API responses that contain private data.
38
+ - `theme-color` meta for light and dark: `<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#09090b">`.
39
+ - Native app needed later? Wrap the same web app with Capacitor; keep the code web-standard so that stays easy.
40
+
41
+ ## Performance on phones
42
+ - Animate `transform` and `opacity` only; avoid big `backdrop-filter` blurs on elements that move or resize.
43
+ - WebGL and canvas: cap device pixel ratio at 1.5 to 2, pause when off screen (IntersectionObserver), stop when the tab is hidden.
44
+ - Lazy-load heavy sections (`React.lazy`, dynamic import) and images below the fold.
45
+ - Budget: LCP under 2.5s, CLS under 0.1, INP under 200ms on a mid-range phone.
46
+
47
+ ## Reduced motion and accessibility
48
+ - `@media (prefers-reduced-motion: reduce)`: stop parallax, auto-play, large movement; keep simple fades.
49
+ - Visible focus rings (`focus-visible:ring-2`), logical tab order, `aria-label` on icon-only buttons, `aria-expanded` on menus.
50
+ - Text contrast at least 4.5:1 (3:1 for large text and UI borders).