components

package
v0.1.20 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 30, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

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

func Chat() templ.Component

Templ component: main chat container.

Renders the full chat UI: message list + input form. Uses Datastar data-signals for reactive state.

func ChatInput

func ChatInput() templ.Component

Templ component: chat input form.

Renders a text input with send button. Uses Datastar data-on-* attributes for form submission handling.

func Message

func Message(msg uimessage.Message) templ.Component

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL