# Flux 2.0 — Assistant panel A side panel for conversing with Runa: messages, cited sources, suggestions and a prompt. Reference: https://flux.kaptio.com/components/assistant-panel/ Requires: https://flux.kaptio.com/tokens/v2/flux.css and flux-components.css ## Use it when Gives an AI assistant a consistent, quiet place beside the work it is helping with. The conversation is a log, so new messages are announced. Replies cite the records they were drawn from as links, so every claim can be checked. Suggestions offer a first prompt, a disclaimer sits under the prompt field, and Enter sends while Shift and Enter adds a line. The panel says it is working while a reply is pending, and the page supplies the reply. ## Do not use it when Not as the only way to do something the interface could do directly. Not for system notifications; use a Toast. Not with a chat bubble style, an avatar for the assistant, or a typing animation. ## Markup ### In a booking ### Working

You

Find alternative hotels near Hella for 14 September.

Runa is working on it
## API - flux-assistant (class): The panel, an aside labelled by its title. - data-flux-assistant (attribute): The assistant’s name. Wires sending, suggestions and the working status. - flux-assistant__header | __mark | __heading | __title | __subtitle | __close (class): The header and its parts. The mark is graphic only. - flux-assistant__log (class): On the role="log" element. - flux-assistant__message (class): A reply. Start it with a visually hidden sender name. - flux-assistant__message--user (class): The person’s message. - flux-assistant__sources | __source | __source-ref (class): The cited sources under a reply. - flux-assistant__suggestions (class): The suggestion row. Hidden when empty. - data-flux-assistant-suggestion (attribute): On a suggestion button: sends its text as a message. - flux-assistant__composer | __field | __send | __disclaimer (class): The prompt form and its parts. - flux-assistant-message (element): Event dispatched on send, with detail.message and detail.respond({ paragraphs, sources }). Sources are { label, ref, href }. ## Accessibility - The log is role="log", so new messages are announced politely as they arrive. - Each message starts with a visually hidden sender, so the conversation reads as a dialogue. - The prompt has a visible label; the disclaimer is bound to it with aria-describedby. - The agents accent is a graphic mark only. All text uses text roles. ## Keyboard - Enter: In the prompt, sends the message. - Shift Enter: In the prompt, adds a new line. - Tab: Moves through sources, suggestions, the prompt and send. ## Tokens - --flux-assistant-width | -height | -bg | -border - --flux-assistant-padding | -gap | -user-bg | -tail-size - --flux-assistant-mark | -mark-size | -meta - --flux-assistant-source-bg | -source-hover ## Do - Cite the records a reply was drawn from, with their references. - Say what the assistant is working on, in the subtitle. - Let the person check and edit anything the assistant drafts before it is sent. ## Do not - Do not stream text in with a typing effect or animate the reply. - Do not give the assistant a face, a coloured bubble or a glow. - Do not use the product accent for text.