Skip to content
Viewership Inquire
Astro UI

Prompt Bar.

Message composer with @ sources, / commands and a model picker.

AgentComponent1 dependency Beautiful UI, MIT

.md

Install

  1. Import the foundation once

    foundation.css holds the tokens every component reads.

    Layout.astro
    ---
    // src/layouts/Layout.astro
    import "../styles/foundation.css";
    ---
  2. Copy PromptBar.astro

    Paste into src/components/viewership/prompt-bar/

  3. Copy its dependencies

    Each in its own folder, next to this one.

  4. Use it

    Page.astro
    ---
    import PromptBar from "../components/viewership/prompt-bar/PromptBar.astro";
    ---
    
    <PromptBar />

Props 11

PropTypeDefaultDescription
shape "rounded" | "pill" "rounded" Card radius, or pill (24px once text wraps).
sources { key, name, desc, icon?, attach?, connect?, connected? }[] [] The @ menu. `attach` opens the file picker; `connect` needs a connection first. Icons: clip, chart, layers, globe, flame, notes, chat, mail, or inner SVG.
commands { key, name, desc }[] [] The / menu. Names include the slash.
models { key, name, tag?, flagship? }[] · Model options. `flagship` plays a sweep.
model string · Initial model key (default: second).
placeholder string "Write a message…" Input placeholder.
tall boolean false Multi-line hero size.
autoplay boolean false Menu walkthrough in view. Stops on input and under reduced motion.
loop boolean true Repeat the walkthrough.
dictationLang string · Dictation language. Defaults to page language.
Events CustomEvent · vs-prompt-submit { text, model, sources, command, attachments, files }, vs-prompt-model { key, name }.

Source 1 file

Ported from Beautiful UI, MIT. Notices.