Skip to content

DocsAIChat

PT

AI

Chat

Question, an answer arriving bit by bit and the copy, regenerate and like actions.

data-u="ai-chat"Demo

Example

Summarize this month's report.

Revenue grew 12% over last month, driven by annual plans. Support costs went down and churn held steady at 2%. I'd keep the pace and revisit pricing next quarter.

Chat with the agent

User bubble, a streaming answer and copy, regenerate and like actions at the end.

Installation

Chat ships in the full package, along with the skill:

curl -fsSL unslop.leallabs.dev/i | sh

The example HTML, to paste:

curl -fsSL unslop.leallabs.dev/i | sh -s add ai-chat

Uses The block is just HTML. The CSS and JS come from the full package's unslop.css and unslop.js.

Classes and variants

ClassWhat it does
.u-ai-askQuestion bubble.
.u-ai-replyAnswer: __av (avatar), __body, __text, __typing.
.u-ai-acts > button.u-ai-actActions, with data-act copy, redo or like.

Accessibility and keyboard

State and roles

WhereAttributeWhat it says
.u-ai-card__panelrole="group" and aria-labelSays it's a demo and of what.
like buttonaria-pressedToggles liked.

Keyboard

KeyDoes
Tabenters the card and pauses the animation while focus is there

Motion

Plays on its own when it enters the viewport, for up to 3 cycles, and stops in its final state. Hovering or focusing inside pauses it. With reduced motion, it shows the final state right away.

Events and API

No public events. For a real chat, copy the markup and wire up your own state, without relying on data-u for logic.

Type to search. Arrows pick, Enter opens.