Generative UI

Pro

The model answers with Koala components instead of prose. Claude writes a short program over a catalog of KPIs, charts, tables, tabs and forms; the page paints it as it streams, and every button or form sends the next message back.

Make a launch checklist for a feature shipping Friday.

Installation#

# One-time setup (tokens + lib helpers)npx koalaui-cli@latest init# Activate your Pro license (once per machine)npx koalaui-cli@latest login <key># Add this component (its dependencies come along)npx koalaui-cli@latest add generative-ui

Usage#

Two halves. On the server, the spec library writes the system prompt and the model streams a program back. On the client, GenerativeUI paints it.

This example is part of Koala UI Pro

The preview is yours to explore. Its code comes with a Pro license, paid once and used in every project.

Have a license? Unlock it here

This example is part of Koala UI Pro

The preview is yours to explore. Its code comes with a Pro license, paid once and used in every project.

Have a license? Unlock it here

Anatomy#

One part: give it the program and it paints the catalog. The program is one statement per line. The root comes first so the layout paints before the data arrives; every name it references resolves as its line streams in.

import { GenerativeUI } from "@/components/ui/generative-ui"<GenerativeUI program={program} streaming={streaming} onAction={onAction} />
This example is part of Koala UI Pro

The preview is yours to explore. Its code comes with a Pro license, paid once and used in every project.

Have a license? Unlock it here

Catalog#

What the model can reach for, grouped the way the prompt teaches it. Each one is a Koala component underneath, so an answer looks like the rest of your product.

Layout
Page, Section, Grid, Tabs, Tab, Card
Text
Heading, Text, Badge, Callout
Data
Stat, Chart, Table, Progress, Details, List, Row
Input
Form, Slider, Choice
Results
Email, Receipt, Receipts, Products, Product
Actions
Actions, Button

Dashboard#

A KPI strip, a trend and the table behind it. A Grid of only Stats becomes one outlined strip; a Card that holds only a Table lets its rows run to both edges.

Build a revenue overview for October.

Revenue overview

October 2026 · all workspaces

MRR
$48.2k
+8.1%vs. September
ARR
$578k
+6.4%run rate
Churn
2.3%
-0.4 ptslogo churn
NPS
61
+3312 responses
MRR by plan ($k)MRR by plan, last six months
MRR by plan ($k)
labelProTeam
May21.411.2
Jun2312
Jul24.812.9
Aug26.113.8
Sep28.914.6
Oct31.217
Top accounts by MRR
AccountPlanMRRSeats
NorthwattTeam$4,82064
HalationPro$2,31018
AlmanacPro$1,94015
OverprintTeam$1,78022

Comparison with a form#

When the answer depends on something the user hasn't said, the model asks with a Form. Submitting sends the field values back as the next message, and the reply is the recommendation below.

Help us choose a CRM for a 12-person B2B sales team.

CRM shortlist for a 12-person sales team

Three tools that fit a B2B team selling annual contracts

  • AT
    Attio
    Flexible data model, strongest for custom workflows
    $34/seatbilled yearly
  • HS
    HubSpot Sales Pro
    Broadest suite, marketing included
    $90/seatbilled yearly
  • PD
    Pipedrive
    Simplest pipeline, fastest to roll out
    $49/seatbilled yearly
First-year cost ($)12 seats, annual plans, onboarding included
First-year cost ($)
labelSeatsOnboarding
Attio4,8960
HubSpot12,9601,500
Pipedrive7,0560
Side by side
ToolPer seatYear 1SetupEmail syncAPI limits
Attio$34$4,8961 weekYesGenerous
HubSpot$90$14,4603 weeksYesTiered
Pipedrive$49$7,0562 daysYesModerate
Tell me about your team
Seats in a year12 seats
What matters most
Already using

Pick one for us: speed to launch, already on Slack.

Pipedrive fits your team best

12 seats, launch fast, already on Slack

Live in
2 days
-12 daysvs. HubSpot
Year 1 cost
$7,056
-$7.4kvs. HubSpot
Slack integration
Native
deal alerts in channels
How each one matches your answers
Pipedrive
Attio
HubSpot

Tabs#

Alternative views of one subject. Tabs keep every panel mounted, so going back to one never redraws its chart.

Make a launch checklist for a feature shipping Friday.

Launch checklist: Shared inboxes

Ships Friday, Nov 7 · 9 of 14 done

Done
9 of 14
+4since Monday
At risk
2
+1need owners
Days left
3
code freeze Thu
TaskOwnerDueStatus
Feature flag at 100% for staffPriya RamanTueDone
Billing migrationUnassignedWedBlocked
Load test at 2x peakTom BeckerWedIn progress
Rollback runbookDaniel OrtizThuDone
TaskOwnerDueStatus
Changelog postLena FischerFriIn review
Help-center articleSam OkaforThuDraft
Email to adminsLena FischerFriScheduled
Engineering
Go to market
Support

People and lists#

Rows with initials, a trailing value and a second line, for candidates, customers or transactions.

Show the hiring pipeline for our two open engineering roles.

Hiring pipeline

2 open engineering roles · last 30 days

Applicants
184
+22%vs. last month
Onsites
9
+3scheduled
Offers out
2
awaiting reply
Time to hire
31 days
-6 daysmedian
Candidates by stageCandidates by stage, both roles
Candidates by stage
labelSenior FrontendPlatform
Applied11272
Screen2819
Tech118
Onsite54
Offer11
  • AT
    Aiko Tanaka
    Onsite Thursday, ex-Linear
    Onsitestrong yes on tech
  • OC
    Owen Clarke
    Offer sent Monday
    Offerreplies by Fri
  • ZM
    Zara Mensah
    Tech interview Wednesday
    Techreferred by Priya
  • MS
    Mateo Silva
    Offer accepted verbally
    Offerstart date TBD
  • HW
    Hannah Weiss
    Onsite Friday
    OnsiteKubernetes depth

Plans#

A day-by-day plan with a form to tune it: budget on a slider, pace and interests as chips.

Plan a long weekend in Lisbon for two in late November.

A long weekend in Lisbon

Fri to Mon · 2 people · late November

Weather
17°C
mild, some rain
Est. total
€1,240
for two
Flight
2h 35m
from Barcelona
  • HM
    Check in at Alfama
    Hotel Memmo, rooftop over the river
    15:00
  • SL
    Miradouro de Santa Luzia
    Sunset, ten minutes on foot
    17:30
  • TF
    Taberna da Rua das Flores
    No bookings, arrive early
    20:00
  • 28
    Tram 28 to Estrela
    Board at Martim Moniz to get a seat
    09:30
  • LX
    LX Factory
    Bookshop, lunch, design shops
    12:00
  • BE
    Belém by the river
    MAAT, then Pastéis de Belém
    16:00
  • SI
    Day trip to Sintra
    Train from Rossio, Pena Palace first
    09:00
  • CA
    Cascais coast
    Bus 403 down the coast, back by train
    15:00
Tune the plan
Budget for two€1,240
Pace
We love

Emails#

Ask for an email and the answer is an Email Draft, not a paragraph: recipients, subject and body the user can edit before sending. Send fires an action, so your app does the sending.

Send Dana an email with the Q3 numbers, copy Marco.

Here is a draft for Dana with the Q3 headline numbers. Edit anything before you send it.

Email sent
To
DDana Whitfield, dana@northwind.co
Cc
MMarco Ruiz, marco@northwind.co
Q3 numbers: revenue up 18%
Hi Dana, Q3 closed at $4.2M in revenue, up 18% on Q2. Net retention landed at 112%, and Team seats grew 31%, most of it after the September launch. Happy to walk you through the breakdown before Thursday's board call. Thanks, Jordi

Receipts#

One receipt paints a full Receipt Card; several fold into compact rows that open in place, with their sum underneath.

Find my Uber receipts from last month.

You took four Uber rides in October, $86.42 in total. Open one to see the fare.

4 rides in October$86.42

Your last grocery run

WFWhole Foods MarketSat, Oct 31 · 10:42 AMPaid
Total$61.65
2×Organic bananas$2.38
1×Sourdough loaf$6.99
2×Greek yogurt$11.98
Subtotal
$59.22
Tax
$2.43
Total
$61.65
Visa ending in 4242

Shopping#

Product searches answer with a Product Carousel. Each card holds a skeleton slot until its name, store and price have streamed in, then resolves in place.

Find stoneware bowls for everyday use, under $60.

Six that hold up to daily use. East Fork's speckled set is the safest bet, and the Food52 celadon bowls are on sale this week.

Extending the catalog#

Define a spec with a name, a description the model reads and a zod schema, bind it to a renderer and pass the extended library. Keep props optional so a half-streamed statement paints a skeleton instead of throwing.

This example is part of Koala UI Pro

The preview is yours to explore. Its code comes with a Pro license, paid once and used in every project.

Have a license? Unlock it here

API reference#

GenerativeUI

Paints an OpenUI Lang program with Koala components. Safe mid-stream: every slot holds a skeleton of its final height until its data arrives, so the answer grows without jumps. Forwards native <div> props.

PropTypeDefaultDescription
programstring-The program as received so far. Pass the growing string on every chunk.
streamingbooleanfalseWhether more is coming. Disables actions and sets aria-busy.
onAction(event: ActionEvent) => void-A follow-up Button or a Form submit. event.humanFriendlyMessage is the next user message; event.formState carries the field values.
onError(errors: OpenUIError[]) => void-Statements that failed to parse or validate, once settled.
libraryLibrarygenerativeLibrarySwap in an extended catalog of your own.
Data attributeDescription
aria-busytrue while streaming.

generativeLibrary

The client catalog: every spec bound to its Koala renderer. Import it to extend with your own components.

generativeSpecLibrary

The same catalog without React, safe on the server. generativeSpecLibrary.prompt() writes the system prompt that teaches the model the language and the components.