-
Notifications
You must be signed in to change notification settings - Fork 40
Creating New Seeds
StyleSeed ships with the toss seed, but the architecture supports multiple design languages. This guide explains how to contribute a new seed.
A seed is a complete, self-contained design system package that an AI coding tool can use to generate consistent UI. It contains:
| Component | Purpose | Required? |
|---|---|---|
DESIGN-LANGUAGE.md |
Visual rules (the "why" and "what") | Yes |
CLAUDE.md |
AI assistant guide (the "how") | Yes |
README.md |
Human-readable overview | Yes |
components/ui/ |
Primitive components | Yes |
components/patterns/ |
Composed patterns | Yes |
css/ |
Theme and styling | Yes |
tokens/ |
JSON design tokens | Yes |
scaffold/ |
Project template files | Recommended |
icons/ |
Custom icon set | Optional |
docs/ |
Showcase, token visualizer | Optional |
Pick a distinct visual style. Good seeds are opinionated and specific:
| Good Seed Ideas | Why |
|---|---|
| "Material You" style | Google's dynamic color system |
| "Linear" style | Minimal, monochrome, sharp edges |
| "Stripe" style | Clean gradients, generous whitespace |
| "Notion" style | Content-first, subtle UI |
| "Vercel" style | Dark-first, developer-focused |
Avoid generic "bootstrap-like" seeds -- the value is in having a strong, specific visual opinion.
Study your reference design and document every rule you can find. The toss seed has 69 rules across these categories:
1. Color philosophy (accent strategy, grayscale levels, impact colors)
2. Typography (size scale, number-unit ratios, label conventions)
3. Layout (section types, spacing system, card structure)
4. Charts and data visualization
5. Interactions and transitions
6. Forbidden patterns
7. Page composition
8. Accessibility
9. Dark mode
10. UX writing tone
Minimum rule count: Aim for at least 30 rules. Fewer than that usually means the design language isn't specific enough.
This is the most important file. Structure it like the toss seed:
# [Seed Name] Design Language Guide
> Extracted from [reference design/product]
## 1. Color Philosophy
### Key Color Principle
- What is the accent strategy?
- How many accent colors?
- Grayscale levels?
## 2. Typography
### Size Scale
| Token | Size | Use |
|-------|------|-----|
### Number Formatting
- How are large numbers displayed?
- Number-unit size ratio?
## 3. Layout
### Section Types
- What are the page building blocks?
- Spacing system?
... (continue for all categories)
## N. Forbidden Patterns
- What should NEVER be done?
## Summary
### Core Principles (numbered list)
### Forbidden (numbered list)Start with these essentials (minimum 15):
button, card, input, textarea, select, checkbox,
radio-group, switch, label, badge, avatar, separator,
skeleton, dialog, tabs, tooltip, form
Every component must follow these conventions:
import * as React from "react"
import { cn } from "./utils"
function MyComponent({ className, ...props }: React.ComponentProps<"div">) {
return (
<div
data-slot="my-component"
className={cn("base-classes", className)}
{...props}
/>
)
}
export { MyComponent }Rules:
-
data-slotattribute on every component -
cn()for className merging (never template literals) - CVA for variant management
-
React.ComponentProps<>for type inference -
classNameprop support on all visual components
Build at least 8 composed patterns:
page-shell -- Page wrapper with max-width and background
top-bar -- App header with logo, actions, subtitle
bottom-nav -- Bottom navigation with tabs
stat-card -- KPI metric card
hero-card -- Large hero metric
section-card -- Generic section wrapper
list-item -- List row with status and trailing content
empty-state -- Zero-data placeholder
:root {
/* Brand */
--brand: #your-accent;
/* Grayscale */
--text-primary: #...;
--text-secondary: #...;
/* ... */
/* Surfaces */
--surface-page: #...;
--card: #...;
/* ... */
/* Shadows */
--shadow-card: ...;
/* ... */
}Create JSON files for cross-platform consumption:
tokens/
colors.json
typography.json
spacing.json
radii.json
shadows.json
motion.json
Format:
{
"color": {
"brand": { "value": "#721FE5", "type": "color" },
"text": {
"primary": { "value": "#3C3C3C", "type": "color" }
}
}
}This file tells the AI how to use your seed. Include:
- Quick start (copy instructions)
- Token customization guide
- Component import patterns
- Component conventions
- Pattern component examples with code
- Tech stack
- File structure
- Forbidden practices
- Slash command reference
scaffold/ contains project template files:
scaffold/
package.json -- Dependencies
vite.config.ts -- Build config
tsconfig.json -- TypeScript config
postcss.config.mjs
index.html -- Entry HTML with viewport-fit=cover
Before submitting a new seed, verify:
-
DESIGN-LANGUAGE.mdhas 30+ rules -
CLAUDE.mdhas setup instructions and all component examples -
README.mddescribes the seed and its origin - At least 15 UI primitives
- At least 8 pattern components
- CSS theme with all semantic tokens
- JSON tokens for all categories
- Dark mode support
- Every component has
data-slot - Every component uses
cn()for className - Every component accepts
classNameprop - All colors reference CSS variables (no hardcoded hex in components)
- Spacing follows a consistent scale
- Typography scale is documented
- Visual style is clearly different from existing seeds
- Rules are specific, not generic
- Forbidden patterns are documented
- The seed produces recognizably different UI from other seeds
-
npm install && npm run devworks from scaffold - All components render without errors
- Dark mode toggles correctly
- Accessibility basics pass (touch targets, contrast, focus rings)
seeds/
my-seed/
README.md
CLAUDE.md
DESIGN-LANGUAGE.md
tokens.ts
css/
fonts.css
theme.css
base.css
index.css
tokens/
colors.json
typography.json
spacing.json
radii.json
shadows.json
motion.json
components/
ui/
utils.ts
button.tsx
card.tsx
input.tsx
... (15+ primitives)
patterns/
page-shell.tsx
top-bar.tsx
bottom-nav.tsx
stat-card.tsx
... (8+ patterns)
scaffold/
package.json
vite.config.ts
tsconfig.json
postcss.config.mjs
index.html
icons/ # Optional
index.tsx
docs/ # Optional
Showcase.tsx
design-tokens.html
- Fork the styleseed repository
- Create your seed directory under
seeds/your-seed-name/ - Ensure all checklist items pass
- Submit a pull request with:
- Seed name and description
- Reference design/product
- Screenshots of generated UI
- Test results (build, render, a11y)
- Start with DESIGN-LANGUAGE.md: Write the rules before building components. The rules ARE the seed; components are just their implementation.
- Be opinionated: A seed that says "maybe use 8px or 12px spacing" is useless. Say "always 6px multiples, period."
- Document forbidden patterns: Knowing what NOT to do is as valuable as knowing what to do.
- Test with AI: Generate pages using your seed with Claude Code. If the AI produces inconsistent results, your rules need to be more specific.
- Keep the rule count manageable: 40-80 rules is the sweet spot. Fewer is too vague; more becomes noise.