Skip to content

DocsAIComposer with attachments

PT

AI

Composer with attachments

Message field with files coming in and out.

data-u="ai-composer"Demo

Example

Main project-mar
report.pdf
budget.xlsx
Hi, what do you need today?
Go through everything

Composer attachments

File cards slide in one by one above the prompt, with a thumbnail and a remove button.

Installation

Composer with attachments 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-composer

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-composer__ctxAttachment row.
.u-ai-composer__boxMessage box.
.u-ai-fileAttachment: --img for images, __name, __x to remove.

Accessibility and keyboard

State and roles

WhereAttributeWhat it says
.u-ai-card__panelrole="group" and aria-labelSays it's a demo and of what.
remove__x buttonRemoves the attachment with a transition.

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.