Skip to content
PLEXON AI
Theme
Download

Chat Experience

DynamicUI Widgets

The AI renders structured information as real interactive components (grids of recipe cards, macro tables, meal-plan timelines, togglable checklists, stat tiles, tabs, and forms) instead of long walls of markdown. 41 typed widgets, safe-by-construction schema validation, theme-aware styling, and graceful streaming.

Cards, tables, timelines and checklists instead of markdown. One switch on the Tools tab turns the whole family on or off.
What happens in this clip
  1. Structured answers render as cards, tables, timelines and checklists rather than a wall of markdown.
  2. The whole family is one entry on the Tools tab in Settings.
  3. One switch turns it on or off for every answer.
  4. The rest of the tools on that tab keep their own switches.
Related features

Rich Responses, Not Walls of Markdown

Plexon lets the AI render structured information as real interactive components instead of long markdown. Ask for a three-day meal plan and you get tabs for each day, a grid of recipe cards with macros, a timeline for the meal schedule, and a tickable grocery list, every element styled to match the rest of the app. Ask for a project dashboard and you get stat tiles, a comparison table, and a progress checklist. Ask for a product catalogue and you get a responsive grid of cards with badges and images. Plain markdown remains the right choice for prose. Widgets are mixed inline with regular text in the same response.

  • 41 typed widget types: eleven for layout (card, grid, list, table, stat tiles, timeline, accordion, tabs, callout, stepper, key-value), seven charts, four indicators (gauge, progress, metric, status), seven that take input, nine for pictures, video, code, maps, 3D scenes, QR codes and embeds, and three for drafts (an HTML page, a file, a set of options)
  • Drop a single picture inline: from a link, or straight from a file the AI just downloaded, no HTML wrapper needed
  • AI chooses the right widget for the shape of the data. The companion skill teaches it when to use each
  • Widgets are theme-aware components. They automatically match your light / dark mode and accent colour
  • Nested composition: a tabs widget can contain a grid of cards whose footer is a stat_tiles, up to 5 levels deep

Model Supplies Data. Plexon Draws the UI.

Widgets are trusted components shipped inside Plexon. For all but one of them, the AI writes no HTML, CSS or JavaScript. It calls plexon_render_ui with short markup such as <card title="Oat porridge" badges="5 min,High protein" />. Plexon checks each widget against its schema before anything is drawn, and an error boundary wraps every instance so one bad payload can never crash the chat. The exception is <html>, a page the AI wrote to a file and Plexon shows in a sandboxed frame. Give it a draft name and the page is also kept as a frame on the canvas (on the board open beside the chat, or on the chat’s own board) with every version in its history. A page-sized design such as a landing page, an app screen, an email or a poster goes straight to the canvas; the inline page is for a quick look inside the reply when no board is open.

  • plexon_render_ui is on in every mode, Plan and Ask included, with nothing to set up
  • Strict per-widget schema validation: every prop is checked before anything renders
  • Image sources are allowlisted: https:// and data:image/* for remote pictures, plus local files kept inside Plexon’s own folders (like the file the AI just downloaded); javascript:, http:, and file: URLs are rejected
  • Error boundary per widget: isolated failure mode, no cascading crash
  • Allowlist sanitization on nested markdown bodies: defence in depth
  • A set of options shows two to four drafts side by side, and your pick comes back to the AI as a message

Interactive When It Matters

Seven of the 41 widgets take input: checklist, selector, slider, form, colour picker, action button and command. Tick off ingredients as you cook, adjust a serving-size slider and watch the macros recompute, pick between three workout tiers with a selector, or fill out a structured form. Interactive state is isolated per widget instance and scoped to the running app session: what you tick, pick or slide is not saved with the chat, and the AI does not see it. A form or an action button the AI sets up to send posts its values back as your next message, and a command card runs on your computer only when you press Run.

  • Checklist: togglable items with a live progress bar (done / total)
  • Selector: button group for picking between alternatives, persists your choice
  • Slider: numeric slider with label, unit, and range; great for "scale this to N servings"
  • Form: multi-field form (text / number / select) with an Edit action; it submits locally unless the AI set it to send the values to the chat
  • Colour picker, action button and command: a hex colour, a button that sends a result, and a command shown in full with Run and Copy
  • State scoped per widget instance, keyed by the message + tool call, in a standalone, isolated state store
A street map of central Athens in a chat with the Kolonaki neighbourhood outlined and pinned, a toolbar under it for picking a point, a box, an outline or the current view, and a Drawn box chip waiting above the message box

Point at the Map

A map in the chat is something you can point at. A small toolbar sits under it: click a spot, drag a box, trace an outline, click a shape the AI drew, or take whatever the map is showing right now. Your pick appears as a chip above the message box and goes to the AI with your next message, as an area it can search inside or describe. Picking never sends anything by itself, and a chip you no longer want comes off before you send. The maps do their own job better too. They fit the area you asked about, their shapes carry names, and the AI can make some of them stand out from the rest.

  • Pick a point, a box, an outline, a drawn shape, or the current view
  • Up to eight picks wait as chips above the message box, and each one can be removed before you send
  • An outline takes up to 50 corners. Backspace removes the last one and Escape takes the drawing back
  • It works from the keyboard: the arrows move the map and Enter places a corner at its centre
  • My location uses your computer’s own position if you allow it. Plexon asks once, and a switch in Settings, Files and privacy turns it off
  • Every map carries the OpenStreetMap credit

Typed, Composable, Extensible

Every widget has a typed props interface mirrored from the struct Plexon checks it against before it renders, so both ends of the pipeline agree on the shape. Any body field marked "Widget | string" can hold either markdown or a nested widget spec: compose freely until depth 5. The widget registry is a simple generic Map<name, component>. Adding a new widget is a few files (a schema case in the validator, typed interface, component, registration line, skill docs). Plugins can register additional widgets at runtime through the same public API that the built-ins use.

  • Discriminated-union schema, checked before the widget renders: add a case to the props validator and an enum entry to the struct tag
  • Generic typed widget components: per-widget prop types preserved at every call site
  • BodyRenderer primitive: nested bodies accept markdown or nested widgets transparently
  • Plugins can register new widget types at runtime via the public registerWidget API

Streams Gracefully, Fails Loudly

Because plexon_render_ui is an MCP tool call, widgets ride the existing streaming pipeline: no new transport, no new content-block type, no changes to session storage. As the AI streams the tool_use input token-by-token, Plexon shows a pulsing "Rendering UI…" skeleton until the JSON closes, then snaps straight to the final widget without an intermediate half-rendered flash. If the model emits a widget type the current client does not know about (for example an older build vs a new plugin), Plexon falls back to a JSON dump with a clear "Unknown widget" warning instead of crashing. Version skew is a visual annoyance, never a broken chat.

  • Partial-JSON tolerance: skeleton until the tool_use input closes, then a single atomic render
  • No new content-block type: widgets travel through the existing tool_use pathway
  • Zero changes to session round-trip: historical sessions replay widgets correctly
  • Graceful unknown-widget fallback: JSON dump with a warning, never a crash
  • A tag or value that is only off the allowed list is corrected and rendered instead of returned as an error, and the AI can ask for a widget skeleton before it writes one

Safe by Construction

Three layers of defence protect the chat UI. (1) Schema validation rejects malformed payloads in the Go tool: invalid enum values, missing required fields, non-https image URLs, and nesting deeper than five all fail before anything is drawn. (2) Numeric and enum props render as escaped text, so a value of "<script>alert(1)</script>" shows up as literal characters. (3) Widget text is markdown, and every piece of it, a paragraph in a card or a single bold word in a table cell, goes through one allowlist sanitizer before it reaches the page: the same allowlist that protects the main markdown pipeline. A page the AI wrote for <html> is fenced off as well. It runs in a sandboxed frame with no access to the app: its scripts run, but they cannot read the app’s cookies or storage, submit a form, open a window or navigate away. A page that throws an error goes back to the AI to fix before the reply lands.

  • Schema validation before anything is drawn, with a strict image URL allowlist and a nesting depth cap
  • Numeric and enum props render as escaped text, never as markup
  • One allowlist sanitizer cleans every markdown body and label, permitting code-block buttons and working-directory images
  • An <html> page comes from a file of at most 2 MB inside your project, a temporary folder or Plexon’s own folders, and runs with no same-origin access, forms, popups or top navigation

What Dynamic UI Widgets give you

41 Typed Widgets

Layout from cards to tabs, seven charts and four indicators, seven widgets that take input, media, maps and 3D scenes, plus HTML pages, files and options for drafts. Each widget has a typed props interface mirrored from the validator’s schema.

Composable Nesting

Any body field accepts a markdown string or a nested widget spec. Tabs holding a grid of cards whose footer is a stat tiles, whose body is a list. Composition is the primitive, up to five levels deep.

Tables, Tiles, Timelines

Tabular macro breakdowns, KPI-style stat tiles with positive / negative deltas, and vertical timelines for schedules and itineraries. The AI picks the shape that fits the data, not the other way round.

Togglable Checklists

Checklists with a live progress bar. Tick items off as you cook, shop, or run through a workflow. State is scoped per widget instance and stays on your machine.

Sliders and Selectors

Adjust a serving-size slider, pick between three tiers with a button group, or fill in a structured form. Interactive widgets use a standalone, isolated state store and never touch the main chat state.

Structured Forms

Multi-field forms with text, number, and select inputs, an Edit button to revise, and a local submit by default. A form the AI sets up to send posts its values back to the chat as your next message.

Safe by Construction

Widgets take data, not HTML, and a page the AI writes runs in a sandboxed frame. Strict per-widget schema validation, output escaping at every prop, and an error boundary around every instance. A single malformed payload can never crash the chat.

Streaming-Aware

Widgets ride the existing tool_use streaming pipeline. Partial JSON shows a pulsing "Rendering UI…" skeleton; closed JSON snaps to the final widget in a single atomic render. No half-rendered flash.

Theme-Aware Styling

Every widget uses Plexon theme tokens and variables. Cards, tables, and tiles match your light / dark mode and accent colour automatically. Nothing clashes with the rest of the app.

Stat Tiles with Deltas

Big readable numbers with units and coloured deltas for comparisons. "Calories 2100 kcal −100" renders a red trend-down badge; "+50" renders a green trend-up. Built for dashboards and daily summaries.

Extensible Registry

A generic Map<name, component> backs the dispatch layer. Plugins can register new widget types at runtime via the same public API the built-ins use. Adding a widget is a few files end-to-end.

Companion Skill

A hidden dynamic-ui companion skill teaches the model when to use each widget, how to compose them tastefully, and hard rules like "never invent image URLs" and "one meal plan equals one tool call, not twenty".

Connects to

Nothing here works alone. See the whole map for how the pieces fit together.

This one is taught in step 6 of 8: make the result visible.

What feeds it

  • Document Signing renders into this.

    The places to sign, and every page once it is signed, come back as a gallery of previews in the chat.

  • AI Chat & Modes renders into this.

    Structured answers render as cards, tables, timelines and forms instead of a wall of markdown.

  • Fast Decisions with Jev feeds this.

    A card or table that came back malformed is repaired by one pick-one question, and a placeholder is drawn while the real one loads.

Where it goes

  • This feeds Design Canvas.

    A page the assistant drafts lands on the board open beside the chat, or on the chat's own board. Open on canvas takes the page a widget is already showing and adds it to a board; Compare on canvas lays every candidate out side by side.