UiPool v0.2.0

Creating Components

Track individual UI components and map them to patterns.

What is a Component? #

In UiPool, a component represents a reusable UI building block. Components can be:

  • Buttons – Primary, secondary, ghost variants
  • Form controls – Inputs, selects, checkboxes
  • Layout elements – Cards, modals, drawers
  • Data display – Tables, lists, badges

Components can be linked to patterns to show which building blocks make up each pattern.

Creating a Component #

To create a component in your UiPool workspace:

  1. Navigate to Components
  2. Click New Component
  3. Fill in the component details:
    • Name – Human-readable component name
    • Slug – URL-friendly ID (used in annotations)
    • Category – Group by type (Buttons, Forms, etc.)
    • Kind – Component type (atom, molecule, organism)
  4. Add optional references (Figma, Storybook, code repository)
  5. Save the component

Component Fields #

FieldRequiredDescription
NameYesDisplay name for the component
SlugYesUnique identifier (kebab-case)
CategoryNoComponent grouping
KindNoatom, molecule, or organism
SummaryNoShort description
Figma URLNoLink to Figma design
Storybook URLNoLink to Storybook story
Repo URLNoLink to source code

Annotating Components #

Track component usage with the uipool-component: annotation:

Button.tsx
// uipool-component: button-primary
export function PrimaryButton({ children, onClick }) {
  return (
    <button 
      className="bg-blue-500 text-white px-4 py-2 rounded"
      onClick={onClick}
    >
      {children}
    </button>
  );
}
Components in scan reports appear in a separate components array, enabling you to see both pattern and component coverage.