输入框加载状态
智能体工作时包裹着聊天作曲家的加载状态 - 一条虹彩光带以恒定速度在胶囊边缘行进,由一条清晰的折射线引导,后面有向内渗出的柔和光晕。打开和关闭它会淡化整个效果,因此作曲家将其读作点亮而不是切换。
CLI
手动安装
CLI 将组件源(及其内部依赖项)复制到您的项目中并安装任何所需的 npm 包。
npx boardui@latest add composer-loader使用共享 UI 包或自定义导入别名? 配置您的安装路径 在运行 CLI 之前。复制粘贴示例使用默认导入。
在一次谈话中
现实场景:用户消息落地,作曲家亮起,同时 AgentThinking 在它上面思考,作曲家控制装置变成液体玻璃,然后回复到达,一切都消失了。一键驱动一切 waiting flag - 内置淡入和淡出。
const [waiting, setWaiting] = useState(false);
async function send(message: string) { setWaiting(true); // light fades in, AgentThinking appears await complete(message); setWaiting(false); // reply landed — everything fades out}
{waiting && <AgentThinking variant="infinity" />}<ComposerLoader active={waiting}> <Composer className="bg-transparent shadow-none" /></ComposerLoader>作曲家本身
这些预览中的胶囊是 对话输入框,AI 聊天模板的输入作为其自己的输入提供 Pro 块:工作附件和模型菜单、麦克风和发送控件、状态栏以及演示使用的液体玻璃处理。 Composer Loader 包装您已有的任何作曲家;将其与此搭配以获得与上面完全相同的外观。
调音
默认灯光是经过调整的房屋风格。 colors 在胶囊上分布四档, arc 设置乐队占据边缘的多少, bloom 和 bloomStrength 决定光线向内渗透的距离,以及 speed 是每圈秒数。带子以恒定速度行进并围绕端盖弯曲;运动停止在 prefers-reduced-motion.
{/* Everything ships tuned; override per surface as needed */}<ComposerLoader colors={["#5eead4", "#46baec", "#e633a4", "#00faa7"]} speed={4.5} // seconds per lap arc={120} // how much of the rim the band occupies intensity={0.7} bloom={16} // how far the light bleeds inward, px bloomStrength={0.3} reverse={false} radius={26} // omit for a full pill> ...</ComposerLoader>