Documentation
¶
Overview ¶
templ: version: v0.3.1001
Package components provides Templ component files (.templ) for rendering AI SDK UI components. These are server-side equivalents of the JS AI SDK component libraries.
Components:
- chat.templ: Main chat container with message list and input
- message.templ: Individual message rendering (user, assistant, system)
- input.templ: Chat input form with send button
All components use Datastar attributes (data-signals, data-on-*) for client-side reactivity and SSE streaming updates.
Run "templ generate" in this directory to generate Go code from .templ files.
templ: version: v0.3.1001
templ: version: v0.3.1001
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Chat ¶
Templ component: main chat container.
Renders the full chat UI: message list + input form. Uses Datastar data-signals for reactive state.
func ChatInput ¶
Templ component: chat input form.
Renders a text input with send button. Uses Datastar data-on-* attributes for form submission handling.
func Message ¶
Templ component: individual message bubble.
Supports user, assistant, and system roles with appropriate styling.
func MessagePart ¶
func MessagePart(part uimessage.MessagePart) templ.Component
Types ¶
This section is empty.