Le Chat Compose
A copy-paste block that recreates the Le Chat prompt stage with Mistral's rail, brand mark, prompt surface, model menu, and tool toggles. The block is not a package component: copy the file, or install it with the shadcn CLI, then edit the layout like any other file in your project. It is assembled entirely from Agent UI compose primitives, and every control is keyboard accessible.
Source you own: install the block with the shadcn CLI or copy components/blocks/composes/mistral-compose.tsx. The preview below is the real file, and the code tab is the exact source.
What can I help you with?
Mistral AI can make mistakes. Check important info.
The code tab contains the full block, ready to copy.
Installation
Add the block with the shadcn CLI. It writes components/blocks/composes/mistral-compose.tsx and installs its dependencies.
npx shadcn@latest add https://agent-ui-27t.pages.dev/r/mistral-compose.jsonPrefer to own the file manually? Install the dependencies, then copy the source from the Files section.
pnpm add @agent-ui/react lucide-reactTailwind CSS v4 users: add @source "../node_modules/@agent-ui/react/src" to the global stylesheet so the library utilities are generated.
Usage
Import the copied file and render it anywhere. The block accepts onSend, disabled, and className; wire onSend to any backend.
import { MistralCompose } from "@/components/blocks/composes/mistral-compose"; <MistralCompose onSend={(text) => console.log(text)} />Files
One file. The same source is served by the shadcn registry endpoint, so the CLI and the docs can never drift.
components/blocks/composes/mistral-compose.tsxtsx"use client"; import * as React from "react";import { ArrowUp, Globe, Plus, Wrench } from "lucide-react";import { ComposeDisclaimer, ComposeSendButton, ComposeTextarea, ModelChip, createCompose, useCompose, type ComposeProps,} from "@agent-ui/react"; const Root = createCompose({ id: "mistral", maxWidth: "max-w-none", placeholder: "Ask Le Chat", models: [ { id: "mistral-large-3", name: "Mistral Large 3", hint: "Flagship" }, { id: "mistral-medium-3", name: "Mistral Medium 3", hint: "Balanced" }, { id: "magistral", name: "Magistral", hint: "Reasoning" }, ], initialToggles: { search: false, tools: false },}); function MistralMark({ className }: { className?: string }) { return ( <svg viewBox="0 0 24 24" className={className} aria-hidden="true"> <defs> <linearGradient id="mistral-m" x1="2" y1="20" x2="22" y2="4" gradientUnits="userSpaceOnUse"> <stop stopColor="#ff6b2c" /> <stop offset="0.55" stopColor="#ff4d00" /> <stop offset="1" stopColor="#ffb800" /> </linearGradient> </defs> <path d="M2 20V8h4v4h3V5h4v5h3V7h4v13h-4v-5h-3v5H9v-4H6v4H2Z" fill="url(#mistral-m)" /> </svg> );} /** Mistral Le Chat: bone-white workspace, pixel-M accents, capsule prompt bar. */function MistralComposeLayout() { const { toggles, toggle } = useCompose(); return ( <div className="flex min-h-[400px] w-full flex-col bg-[#f7f7f4] px-6 pb-6 pt-4 text-[13px] text-[#1c1c1c]"> <div className="flex items-center gap-2.5 border-b border-black/[0.07] pb-3"> <MistralMark className="h-5 w-5" /> <span className="text-[14px] font-semibold tracking-tight">Mistral</span> <span className="rounded bg-[#ff4d00]/10 px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wide text-[#d94300]"> Le Chat </span> <div className="ml-auto flex items-center gap-2"> <button type="button" className="text-[11px] text-black/60"> Sign in </button> <button type="button" className="rounded-full bg-[#141414] px-3.5 py-1.5 text-[11px] font-medium text-white" > Start building </button> </div> </div> <div className="my-auto flex w-full flex-col items-center pt-5"> <MistralMark className="h-10 w-10" /> <h1 className="mt-3 text-center text-[25px] font-normal tracking-[-0.02em]"> What can I help you with? </h1> <div data-agent-id="compose-card" className="mt-5 flex w-full max-w-[480px] items-center gap-2 rounded-full border border-black/[0.09] bg-white py-1.5 pl-4 pr-1.5 shadow-[0_2px_10px_rgba(0,0,0,0.04)] transition-[border-color,box-shadow] duration-200 focus-within:border-black/25 focus-within:shadow-[0_4px_18px_rgba(255,77,0,0.12)]" > <button type="button" aria-label="Attach" className="grid h-7 w-7 shrink-0 place-items-center rounded-full text-black/65 hover:bg-black/5" > <Plus className="h-[18px] w-[18px]" aria-hidden="true" /> </button> <ComposeTextarea aria-label="Ask Le Chat" placeholder="Ask Le Chat" rows={1} className="min-w-0 flex-1 px-1 py-1.5 text-[14px] leading-5 placeholder:text-black/35" /> <div className="flex shrink-0 items-center gap-1"> <button type="button" aria-label="Toggle web search" aria-pressed={toggles.search} onClick={() => toggle("search")} className="grid h-7 w-7 place-items-center rounded-full text-black/45 hover:bg-black/5 aria-pressed:bg-[#ff4d00]/10 aria-pressed:text-[#d94300]" > <Globe className="h-3.5 w-3.5" aria-hidden="true" /> </button> <button type="button" aria-label="Toggle tools" aria-pressed={toggles.tools} onClick={() => toggle("tools")} className="grid h-7 w-7 place-items-center rounded-full text-black/45 hover:bg-black/5 aria-pressed:bg-[#ff4d00]/10 aria-pressed:text-[#d94300]" > <Wrench className="h-3.5 w-3.5" aria-hidden="true" /> </button> <ModelChip tone="light" className="[&>button]:h-7 [&>button]:px-1.5 [&>button]:text-[11px] [&>button]:text-black/55 [&>button]:hover:bg-black/5" /> <ComposeSendButton aria-label="Send message" className="h-8 w-8 bg-[#141414] text-white hover:bg-[#2a2a2a] disabled:bg-[#e4e4de] disabled:text-black/30 disabled:opacity-100" icon={<ArrowUp className="h-[16px] w-[16px]" strokeWidth={2.4} />} /> </div> </div> <div className="mt-4 flex flex-wrap items-center justify-center gap-2"> {["Write a memo", "Debug this code", "Analyze a document"].map((label) => ( <button key={label} type="button" className="rounded-full border border-black/[0.08] bg-white px-3 py-1.5 text-[10.5px] text-black/60 hover:bg-[#ff4d00]/5" > {label} </button> ))} </div> </div> <ComposeDisclaimer className="mt-0 text-[9.5px] text-black/40"> Mistral AI can make mistakes. Check important info. </ComposeDisclaimer> </div> );} export function MistralCompose(props: ComposeProps) { return ( <Root {...props}> <MistralComposeLayout /> </Root> );} Built with
The block imports these Agent UI primitives. Each one is a package export with its own docs page, so you can change the layout without giving up the behaviour.
Accessibility
Le Chat also has a full product page.
Metadata, model list, and the same block in a dedicated route.
MistralCompose composes with MessageList, ChatShell, useChat, and the provider compose blocks. Browse the full reference or see all components in the gallery.
147 lines · copy-ready