UI Pattern
Overview
Part of StyleSeed, this skill builds reusable composed patterns from the seed's primitives. It is intended for sections like card lists, grids, form blocks, ranking lists, and chart wrappers that appear across multiple pages and need to look deliberate rather than ad hoc.
When to Use
- Use when you need a reusable layout pattern rather than a one-off page section
- Use when a page repeats the same arrangement of cards, rows, filters, or data blocks
- Use when you want to build from existing StyleSeed primitives instead of copying markup
- Use when you want a pattern component with props for dynamic content
How It Works
Step 1: Identify the Pattern Type
Common pattern families include:
- card section
- two-column grid
- horizontal scroller
- list section
- form section
- stat grid
- data table
- detail card
- chart card
- filter bar
- action sheet
Step 2: Read the Available Building Blocks
Inspect both:
components/ui/ for primitives
components/patterns/ for neighboring patterns that can be extended
The goal is composition, not duplication.
Step 3: Apply StyleSeed Layout Rules
Keep the Toss seed defaults intact:
- card surfaces on semantic tokens
- rounded corners from the system scale
- shadow tokens instead of improvised shadow values
- consistent internal padding
- section wrappers that align with the page margin system
Step 4: Make the Pattern Dynamic
Expose data through props instead of hardcoding content. If a pattern has multiple variants, keep the API explicit and small.
Step 5: Keep the Pattern Reusable Across Pages
Avoid page-specific assumptions unless the user explicitly wants a one-off section. If the markup only works on one route, it probably belongs in a page component, not a shared pattern.
Output
Provide:
- The generated pattern component
- The target location
- Expected props and usage example
- Notes on which existing primitives were reused
Best Practices
- Start from the smallest existing building block that solves the problem
- Keep container, section, and item responsibilities separate
- Use tokens and spacing rules consistently
- Prefer extending a pattern over adding a near-duplicate sibling
Additional Resources
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Core Process
- Identify the recurring UI challenge and select the appropriate StyleSeed primitives.
- Compose the primitives into a flexible pattern that accepts variable content.
- Implement standard error handling and edge cases (e.g., long text overflow).
- Document the pattern for reuse across the application.
Common Rationalizations
| Rationalization |
Reality |
| I'll build a custom grid for this specific layout. |
Fails to leverage existing StyleSeed grid primitives, reducing consistency. |
| This form doesn't need the standard validation pattern. |
Inconsistent validation patterns confuse users and reduce trust. |
| I'll hardcode the list spacing. |
Breaks the reusable pattern design, making it brittle to global spacing updates. |
Red Flags
- Reinventing standard patterns instead of composing them from primitives.
- Hardcoded layouts that don't adapt to different content lengths.
- Inconsistent error handling in form patterns.
Verification
1---2name: ui-pattern3description: Use when generating reusable UI patterns such as card sections, grids, lists, forms, and chart wrappers using StyleSeed Toss primitives.4---56# UI Pattern78## Overview910Part of [StyleSeed](https://github.com/bitjaru/styleseed), this skill builds reusable composed patterns from the seed's primitives. It is intended for sections like card lists, grids, form blocks, ranking lists, and chart wrappers that appear across multiple pages and need to look deliberate rather than ad hoc.1112## When to Use13- Use when you need a reusable layout pattern rather than a one-off page section14- Use when a page repeats the same arrangement of cards, rows, filters, or data blocks15- Use when you want to build from existing StyleSeed primitives instead of copying markup16- Use when you want a pattern component with props for dynamic content1718## How It Works1920### Step 1: Identify the Pattern Type2122Common pattern families include:23- card section24- two-column grid25- horizontal scroller26- list section27- form section28- stat grid29- data table30- detail card31- chart card32- filter bar33- action sheet3435### Step 2: Read the Available Building Blocks3637Inspect both:38- `components/ui/` for primitives39- `components/patterns/` for neighboring patterns that can be extended4041The goal is composition, not duplication.4243### Step 3: Apply StyleSeed Layout Rules4445Keep the Toss seed defaults intact:46- card surfaces on semantic tokens47- rounded corners from the system scale48- shadow tokens instead of improvised shadow values49- consistent internal padding50- section wrappers that align with the page margin system5152### Step 4: Make the Pattern Dynamic5354Expose data through props instead of hardcoding content. If a pattern has multiple variants, keep the API explicit and small.5556### Step 5: Keep the Pattern Reusable Across Pages5758Avoid page-specific assumptions unless the user explicitly wants a one-off section. If the markup only works on one route, it probably belongs in a page component, not a shared pattern.5960## Output6162Provide:631. The generated pattern component642. The target location653. Expected props and usage example664. Notes on which existing primitives were reused6768## Best Practices6970- Start from the smallest existing building block that solves the problem71- Keep container, section, and item responsibilities separate72- Use tokens and spacing rules consistently73- Prefer extending a pattern over adding a near-duplicate sibling7475## Additional Resources7677- [StyleSeed repository](https://github.com/bitjaru/styleseed)78- [Source skill](https://github.com/bitjaru/styleseed/blob/main/seeds/toss/.claude/skills/ui-pattern/SKILL.md)7980## Limitations81- Use this skill only when the task clearly matches the scope described above.82- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.83- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.848586## Core Process871. Identify the recurring UI challenge and select the appropriate StyleSeed primitives.882. Compose the primitives into a flexible pattern that accepts variable content.893. Implement standard error handling and edge cases (e.g., long text overflow).904. Document the pattern for reuse across the application.9192## Common Rationalizations93| Rationalization | Reality |94|---|---|95| I'll build a custom grid for this specific layout. | Fails to leverage existing StyleSeed grid primitives, reducing consistency. |96| This form doesn't need the standard validation pattern. | Inconsistent validation patterns confuse users and reduce trust. |97| I'll hardcode the list spacing. | Breaks the reusable pattern design, making it brittle to global spacing updates. |9899## Red Flags100- Reinventing standard patterns instead of composing them from primitives.101- Hardcoded layouts that don't adapt to different content lengths.102- Inconsistent error handling in form patterns.103104## Verification105- [ ] Pattern correctly composes existing StyleSeed primitives.106- [ ] Layout responds gracefully to varying content lengths.107- [ ] Standard interactive patterns (e.g. form validation) are maintained.