ainativeui

01Catalog

Built-in widgets & recipes.

The model picks from this catalog — allowlisted at prompt time so it only sees what you permit. Add your own by conforming to AIWidget.

02Widgets · 14 total

Widgets

Counter

counter

Incrementable numeric counter with min/max/step. Fires on every change.

{ "initialValue": 0, "min": 0, "max": 100, "step": 1, "label": "Score" }

Timer

timer

Countdown with a circular ring and play/pause/reset. Fires timerFinished.

{ "durationSeconds": 300, "label": "Focus timer" }

Stopwatch

stopwatch

Elapsed-time counter with the same circular ring. Fires at lap marks.

{ "label": "Elapsed" }

Checklist

checklist

Interactive to-do list with progress bar. Each item fires on toggle.

{ "title": "Today", "items": [ { "label": "Tests", "done": false } ] }

Media control

media_control

Play/pause/skip controls for audio or video. Fires the chosen action.

{ "title": "Chill Lofi Mix", "artist": "lofi beats", "duration": 3600 }

Tic-Tac-Toe

tic_tac_toe

Self-contained game board with built-in AI opponent. Fires win/draw events.

{ "playerSymbol": "X" }

Chart

chart

Bar, line, or pie via Recharts. Configurable axis keys, colors, title.

{ "type": "bar", "xKey": "month", "yKey": "revenue", "data": [ ... ] }

Markdown

markdown

Renders Markdown content. Headings, lists, links, inline code; no HTML passthrough.

{ "content": "## Hello\n\nThis is **bold** text." }

Code block

code_block

Syntax-highlighted, read-only code display with copy-to-clipboard.

{ "language": "swift", "code": "let x = 1" }

Code editor

code_editor

Editable code area with a Run button. Fires codeRun with the content.

{ "language": "python", "initialCode": "print('hi')" }

Calendar

calendar

Month view with event markers. Fires dateTapped with the selected date.

{ "month": 5, "year": 2026, "events": [ ... ] }

Map

map

Interactive map view with annotation pins. Backed by MapKit on device.

{ "latitude": 37.7749, "longitude": -122.4194, "zoom": 12, "pins": [] }

QR code

qr_code

Generates a scannable QR code. Configurable size and label. CoreImage on device.

{ "content": "https://ainativeui.org", "label": "Scan to visit" }

Crossword

crossword

Interactive crossword puzzle. Auto-focus advance, direction toggle, completion detection.

{ "title": "Quick crossword", "grid": [...], "cluesAcross": [...], "cluesDown": [...] }

03Recipes · 14 total

Recipes

Stat card

stat_card

Single KPI with label, value, and optional delta indicator.

Comparison table

comparison_table

Feature comparison grid with configurable headers and rows.

Hero

hero

Large title card with optional image, subtitle, body, and CTA.

Checklist with progress

checklist_with_progress

Checklist plus a progress-bar header and a completion action.

Form stack

form_stack

Vertically stacked form fields with consistent spacing and submit.

KPI grid

kpi_grid

2- or 3-column grid of stat_cards. Used for dashboard-style queries.

Narrative

narrative

Long-form layout with headline, body paragraphs, and an optional code block.

Feed card

feed_card

Image + title + body + metadata. Article previews, search results, activity items.

Message bubble

message_bubble

Chat bubble with sender, timestamp, and read receipt.

Breadcrumb

breadcrumb

Horizontal navigation path. Used inside multi-step flows.

Suggestion cluster

suggestion_cluster

Header + chips + optional dismiss. Each chip carries its manifest — local-apply on tap.

Chip

chip

Single tappable option chip. Used inside suggestion_cluster.

Timeline

timeline

Vertical timeline of labeled steps with optional status indicators.

Data table

data_table

Sortable tabular data with configurable columns. Fires sort and row-tapped events.