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:
- Navigate to Components
- Click New Component
- 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)
- Add optional references (Figma, Storybook, code repository)
- Save the component
Component Fields #
| Field | Required | Description |
|---|---|---|
| Name | Yes | Display name for the component |
| Slug | Yes | Unique identifier (kebab-case) |
| Category | No | Component grouping |
| Kind | No | atom, molecule, or organism |
| Summary | No | Short description |
| Figma URL | No | Link to Figma design |
| Storybook URL | No | Link to Storybook story |
| Repo URL | No | Link 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. Linking to Patterns #
Components can be linked to patterns to show the relationship between building blocks and design patterns.
- Open a pattern detail page
- Click + Manage in the Components section
- Select the components that make up this pattern
- Save changes
This creates a mapping that helps teams understand which components are used in each pattern.