UiPool v0.2.0

Creating Patterns

Define UI patterns that capture design decisions and usage guidelines.

What is a Pattern? #

A pattern represents a reusable UI solution that solves a common design problem. Examples include:

  • Login Flow – The complete authentication experience
  • Data Table – Displaying tabular data with sorting and filtering
  • Confirmation Dialog – Destructive action confirmations
  • Search with Filters – Search interface with faceted filtering

Creating a Pattern in UiPool #

To create a pattern in your UiPool workspace:

  1. Navigate to Patterns
  2. Click New Pattern
  3. Fill in the pattern details:
    • Name – Human-readable pattern name
    • Slug – URL-friendly ID (used in annotations)
    • Category – Group patterns by type (Forms, Navigation, etc.)
    • Summary – Brief description of the pattern
  4. Add usage guidelines (when to use / when not to use)
  5. Save the pattern

Pattern Fields #

FieldRequiredDescription
NameYesDisplay name for the pattern
SlugYesUnique identifier (kebab-case)
CategoryYesPattern grouping
SummaryNoShort description
When to UseNoList of appropriate use cases
When Not to UseNoAnti-patterns and alternatives
AnatomyNoComponent parts of the pattern
RulesNoGuidelines with severity levels
DeprecatedNoMark pattern as deprecated

Annotating Your Code #

Once you've created a pattern, annotate your code to track usage:

// uipool-pattern: login-flow
export function LoginPage() {
  // Your login implementation
}
The annotation ID must match the pattern's slug exactly.