Skip to content

UI Primitives

Browse the catalog of 30 UI primitives and their presentation contracts. Each primitive defines what it does, when to use it, and when to avoid it.

GET /api/primitives

Returns the full catalog of UI primitives. Accepts an optional category filter.

Parameters

NameInTypeRequiredDescription
categoryquerystringNoFilter by category: collection, input, form, layout, page, display, feedback

Request

bash
curl https://public.ikary.co/api/primitives

Filter by category:

bash
curl "https://public.ikary.co/api/primitives?category=form"

Response

Without filter, returns all 30 primitives:

json
[
  {
    "key": "data-grid",
    "category": "collection",
    "description": "Sortable, filterable tabular data grid with pagination",
    "bestFor": ["large entity lists", "sortable/filterable data"],
    "avoidWhen": ["card-heavy visual displays"]
  },
  {
    "key": "card-list",
    "category": "collection",
    "description": "Card-based collection layout for visual data",
    "bestFor": ["visual summaries", "dashboard widgets"],
    "avoidWhen": ["dense tabular data"]
  }
]

Response truncated. The full response contains 30 entries.

With ?category=form:

json
[
  { "key": "form", "category": "form", "description": "Complete form with sections, validation, and submit actions", "bestFor": ["entity create/edit pages"] },
  { "key": "form-field", "category": "form", "description": "Individual form field wrapper with label and validation", "bestFor": ["wrapping input primitives in forms"] },
  { "key": "form-section", "category": "form", "description": "Grouped section within a form", "bestFor": ["organizing related fields"] }
]

Categories

CategoryCountContains
collection5data-grid, card-list, pagination, filter-bar, bulk-command-bar
input7input, textarea, select, checkbox, radio-group, toggle, date-input, relation-field
form3form, form-field, form-section
layout5page-shell, sidebar, toolbar, split-pane, tabs
page3list-page, detail-page, dashboard-page
display4stat-card, badge, timeline, detail-field
feedback3toast, confirm-dialog, empty-state

GET /api/primitives/

Returns the presentation contract for one UI primitive.

Parameters

NameInTypeRequiredDescription
keypathstringYesPrimitive key (e.g., data-grid, form, toast)

Request

bash
curl https://public.ikary.co/api/primitives/data-grid

Response

json
{
  "key": "data-grid",
  "category": "collection",
  "description": "Sortable, filterable tabular data grid with pagination",
  "bestFor": ["large entity lists", "sortable/filterable data"],
  "avoidWhen": ["card-heavy visual displays"]
}

Returns an error if the key does not match any known primitive. See Error Handling for the error shape.