AI Elements

PreviousNext

Patterns for agentic interfaces, built from Zard UI components.

AI Elements are patterns for building agentic interfaces. Each one is a composition of Zard UI components that you copy into your project. There is no package to install and no new component to learn. The code is yours.
A chat is a list of Message turns. The steps an agent takes inside a turn, like Reasoning, Plan and Task, are built on Trace, so every step has the same shape.

Patterns

Get started

Add the components

Most patterns are built on Trace. Add it, and any other component a pattern lists on its page.

Copy
npx zard-cli add trace

Copy a pattern

Open a pattern above and copy the code of its example into your project. Every example is a standalone component, so it runs as soon as the components it imports are installed. Or ask your coding agent to do it:

Prompt Copy
Add the Reasoning pattern from https://zardui.com/docs/ai-elements/reasoning.md to my chat.

Streaming

The examples that stream, like Reasoning and Task, simulate the agent in the browser with signals and timers. There is no backend and no AI SDK.
To plug in a real model, keep the template and replace the simulated run: write each chunk your stream sends into the same signals. The pattern does not care where the text comes from, only that the signals change.
github iconwhatsapp icondiscord iconX icon

Made with ❤ in Brazil. Open source and available on GitHub .