Component library
The marketing worker draws on a library of registered visual components: patterns, shaders, marquees, ripple effects, particle fields. Each component has an id the planner can reference, a default prop set, and a constraint on where it can be positioned. The component index lives in R2 so the planner can read summaries of every available component without inlining them in the prompt.
Overview
- Registered components
- 31
- Registry file
cf-workers/marketing-swarm/carousel-engine/src/library-registrations.tsx- Component index (R2)
carousel-engine-index/component-index.json- Themes file
cf-workers/marketing-swarm/carousel-engine/src/themes.ts- Default theme
editorial-premium
The component index
A JSON file in R2 enumerating every component the renderer knows how to draw.
library-registrations.tsx, extracts each component's metadata, and enriches the purpose and vibe tags with a Gemma pass. The enriched index lets the planner pick components by feel rather than by exact name.Registration
A component is registered by adding an import and an entry to library-registrations.tsx.
Themes
A theme is a palette plus type scale plus rhythm. Slides inherit the active theme unless they override colours explicitly.
Pattern components
Backdrops the planner reaches for first.
| Component | Purpose |
|---|---|
magicui/dot-pattern | Subtle dotted grid for hero slides |
magicui/grid-pattern | Square grid backdrop |
magicui/animated-grid-pattern | Grid with subtle animation |
magicui/flickering-grid | Grid with flicker cells |
magicui/particles | Sparse particle field |
magicui/meteors | Sweeping meteor streaks |
magicui/retro-grid | Perspective grid |
magicui/ripple | Concentric ripple |
Shader components
Paper Design WebGL-style shaders for premium-feel backgrounds.
| Component | Purpose |
|---|---|
shaders/aurora | Slow-moving colour wash |
shaders/mesh-gradient | Gradient mesh that drifts |
Primitives
Smaller library pieces used for accents and overlays.
| Category | Examples |
|---|---|
| Borders and beams | border-beam, shine-border, neon-gradient-card |
| Cards | magic-card, neon-gradient-card |
| Marquees and orbits | marquee, orbiting-circles, icon-cloud |
| Globes and avatars | globe, avatar-circles |
| Text effects | animated-gradient-text, aurora-text, sparkles-text, line-shadow-text |
| Numbers | number-ticker |
| Buttons | shimmer-button, rainbow-button, pulsating-button |