Showtimes
Pick one session from a venue's schedule by day, with titles, time chips and a ticket count.
Experience · Shares patterns with Slot Picker, Seat Map
≈ 3,252 tokens per use (tool 972 · guidance 220 · typical payload 2,060)How token costs are estimated
Example: Showtimes
What's playing at the Harbor Lights Cinema tonight?
Harbor Lights Cinema
Times are in Chicago time.
October 2026
When to use
- The user wants to see what's on and pick a session: films, theater, concerts, classes, tours, restaurant seatings.
- The agent fetched a venue's schedule with real session ids.
When not to use
- The agent hasn't fetched the schedule. Never invent titles or times.
- There's one title with one session. Ask for a yes or no in text.
- Booking a generic appointment with no titles to choose between. Use a Slot Picker.
How the agent should use it
- Every title and session comes from a tool result, with its real
id. - Only include days that have sessions. Mark sold-out sessions with
soldOutinstead of dropping them, so the user sees the whole schedule. - Set
defaultDateto the day the user asked about ("tonight" → today). - The result is a choice, not a booking. Check availability and confirm the price before booking anything.
Interaction
- Header: the venue name, then the month of the visible days with previous and next buttons that page the strip a week (7 session days) at a time when there are more than 7. Paging selects the first day of the new page. The venue's time zone is announced to screen readers only.
- Day strip: a radio group with a roving tabindex. Arrow keys move between all days (across pages), Home and End jump to the ends. Each day shows its weekday (or its
label, e.g. "Today") over the date; the selected day is a filled circle. Days without sessions aren't shown. - Sessions: every time chip on the day is one radio in a single group spanning all titles, so there's one selection in total. Each is labelled with its context, e.g. "The Long Harbor, 9:00 PM, IMAX, sold out". Sold-out sessions are disabled and struck through;
fewLeftadds a small "Few left". Titles with nothing on the selected day are hidden; with none at all it says "Nothing this day". - Title rows: the name, then one quiet line with
subtitle, up to twotags(tags that repeat a session format, like "IMAX" on IMAX chips, are dropped) and the lowest price ("From $11.50"). - Posters:
imagemust be an http(s) URL with realalt. Without one, a neutral tile shows the title's initials. - Footer: the chosen session ("Glass Orchard · Sun, Oct 11 · 7:15 PM"), a stepper when
quantityis set, the total in bold when the session has a price, and Continue (disabled until a session is picked). - Formatting: dates, times and prices use
Intlwith thelocalehost prop,"en-US"by default, so server and client agree. Times are wall-clock at the venue and never shifted by the viewer's zone.
Installation
npx shadcn@latest add https://your-site.com/r/showtimes.json
Usage
import { tool } from "ai"
import { showtimesTool } from "@/components/genui/showtimes.schema"
const tools = {
// No execute(): the call is completed by the user's choice in the UI.
[showtimesTool.name]: tool({
description: showtimesTool.description,
inputSchema: showtimesTool.inputSchema,
}),
}import { Showtimes } from "@/components/genui/showtimes"
function ToolPart({ part, addToolResult }) {
if (part.type !== "tool-pick_showtime") return null
return (
<Showtimes
{...part.input}
status={part.state === "input-streaming" ? "streaming" : undefined}
result={part.state === "output-available" ? part.output : undefined}
onResult={(result) =>
addToolResult({
tool: "pick_showtime",
toolCallId: part.toolCallId,
output: result,
})
}
/>
)
}The agent receives one of:
{ action: "select", sessionId: "go-20261011-1915", titleId: "glass-orchard", date: "2026-10-11", time: "19:15", quantity: 2 }
{ action: "dismiss" }quantity is only present when the quantity prop was set. Nothing is booked; the agent takes it from there.
With LangGraph
Push it from a graph node with ui.push({ name: "pick_showtime", props: { toolCallId, ...args } }, { message }), and render the thread's UI messages with the Renderer.
Restoring from history
Pass the stored result back as result. It opens on the chosen day with the session and count selected, read-only, and never calls onResult again.
<Showtimes
{...part.input}
result={part.state === "output-available" ? part.output : undefined}
/>Schema
| Prop | Type | Notes |
|---|---|---|
venue | { name, timeZone }? | Data-bound. Times are local to the venue |
days | { date, label? }[] | Data-bound. 1–14 dates with sessions, YYYY-MM-DD |
titles | Title[] | Data-bound. What's on |
currency | string? | ISO 4217 code for prices |
defaultDate | string? | Day to open on. Default: the first |
quantity | { min, max, default, label? }? | Adds a stepper. label defaults to "Tickets" |
submitLabel | string? | Verb for the button. Default "Continue" |
Title
| Field | Type | Notes |
|---|---|---|
id | string | Data-bound. Returned in the result |
name | string | "The Long Harbor" |
subtitle | string? | "PG-13 · 2 h 18 min · English" or "with Maya Ortiz" |
image | { src, alt }? | http(s) only. Omit for an initials tile |
tags | string[]? | Up to 3: "IMAX", "Subtitled" |
sessions | Session[] | Data-bound. In time order |
Session
| Field | Type | Notes |
|---|---|---|
id | string | Data-bound. Returned in the result |
date | string | YYYY-MM-DD, venue local |
time | string | HH:mm, venue local |
format | string? | "IMAX", "3D", "Relaxed" |
soldOut | boolean? | Disabled and struck through |
fewLeft | boolean? | Adds "Few left" |
price | number? | Per ticket, in currency |
Host props: status (streaming, ready, submitting, selected, dismissed), onResult, result, locale and className.
Source
Hotel Booking
One hotel's rooms and rates for the user's stay, with the full price and cancellation terms, handed off to the host's booking flow. Also shows an existing reservation.
Seat Map
Let the user pick seats on a real layout (a plane, a cinema, a theatre with curved rows and several levels, a train or bus coach, an event floor), one per passenger or a set count.


