Component
UI component in the Cuppa framework
Schema
| Property | Type | Required | Description |
|----------|------|----------|-------------|
| id | string (uuid) | ✓ | Unique identifier for the component |
| name | string | ✓ | Component name (e.g., 'PrimaryButton', 'CardView') |
| category | enum | ✓ | Component category |
| description | string | ✓ | Brief description of the component |
| documentation | string | | Full documentation in markdown format |
| code_example | string | | Swift code example showing usage |
| preview_url | string (uri) | | URL to component preview image or video |
| version | string | | Component version (semantic versioning) |
| platforms | string[] | | Supported platforms |
| dependencies | string[] | | Required dependencies |
| tags | string[] | | Tags for search and categorization |
| created_at | string (date-time) | | When the component was created |
| updated_at | string (date-time) | | When the component was last updated |
Example
{
"id": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
"name": "PrimaryButton",
"category": "buttons",
"description": "A styled primary action button with loading state support",
"documentation": "# PrimaryButton\n\nA customizable button for primary actions...",
"code_example": "PrimaryButton(\"Submit\") {\n viewModel.submit()\n}",
"preview_url": "https://mycuppa.io/components/primary-button.png",
"version": "1.2.0",
"platforms": [
"ios",
"macos"
],
"dependencies": [
"CuppaUI"
],
"tags": [
"button",
"action",
"primary"
],
"created_at": "2025-01-15T08:00:00Z",
"updated_at": "2025-11-06T10:00:00Z"
}
Enums
category
buttons | forms | cards | lists | navigation | overlays | feedback | layout