Skip to main content

Built-in GenUI components

Auto-registered by importing @chativa/genui.

Component namePurposeKey propsEmits
genui-textMarkdown text blockcontent: string
genui-cardCard with title, description, optional actionstitle, description, image?, actions[]chat-action (when an action is tapped)
genui-formDynamic form with validationtitle?, buttonText?, fields: { name, label, type, placeholder?, required? }[]form_submit → connector; on success injects form_success
genui-alertStyled alert boxvariant: "info" | "success" | "warning" | "error", title?, message
genui-quick-repliesQuick-reply chip grouplabel?, items: { label, value?, icon? }[]chat-action
genui-listScrollable item listtitle?, ordered?, items: { text, secondary?, icon? }[]
genui-tableData tabletitle?, columns?, rows[][]
genui-ratingStar ratingtitle?, maxStars?rating_submit
genui-progressProgress barlabel?, value (0-100), caption?, variant?
genui-date-pickerDate inputlabel?, min?, max?date_submit
genui-chartBar / line / pie charttype: "bar" | "line" | "pie", title?, labels?, datasets
genui-stepsVertical step liststeps: { label, status, description? }[]
genui-image-galleryGrid of imagescolumns?, images: { src, alt?, caption? }[]
genui-typewriterAnimated typewriter textcontent, speed?, cursor?
genui-appointment-formSpecialised appointment formfields[]form_submit

Visual reference

ComponentScreenshot
genui-formgenui-form
genui-cardgenui-card
genui-tablegenui-table
genui-chartgenui-chart
genui-alertgenui-alert
genui-quick-repliesgenui-quick-replies
genui-listgenui-list
genui-ratinggenui-rating
genui-progressgenui-progress
genui-stepsgenui-steps
genui-image-gallerygenui-image-gallery
genui-typewritergenui-typewriter
genui-date-pickergenui-date-picker

Screenshots are pending capture from the sandbox.

Using a built-in from the bot side

genUICallback(streamId, {
type: "ui",
component: "genui-form",
props: {
title: "Get in touch",
buttonText: "Send",
fields: [
{ name: "name", label: "Full Name", type: "text", placeholder: "Jane Doe", required: true },
{ name: "email", label: "Email", type: "email", placeholder: "[email protected]", required: true },
],
},
id: 1,
}, false);

When the user taps Submit, the form fires form_submit with { name, email }. Your connector receives it via receiveComponentEvent(streamId, "form_submit", payload) and can stream back a form_success event chunk to swap the form for a success view.