MiniMax Code Compose
A copy-paste block that recreates the MiniMax Code prompt stage with MiniMax'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/minimax-compose.tsx. The preview below is the real file, and the code tab is the exact source.
What can I build for you?
MiniMax H3 Image
One prompt to a finished visual.
MiniMax 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/minimax-compose.tsx and installs its dependencies.
npx shadcn@latest add https://agent-ui-27t.pages.dev/r/minimax-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 { MiniMaxCompose } from "@/components/blocks/composes/minimax-compose"; <MiniMaxCompose 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/minimax-compose.tsxtsx"use client"; import * as React from "react";import { ArrowUp, ChevronDown, Download, PanelLeft, Plus, Search, Sparkles } from "lucide-react";import { ComposeSendButton, ComposeTextarea, ModelChip, createCompose, useCompose, type ComposeProps,} from "@agent-ui/react"; const Root = createCompose({ id: "minimax", maxWidth: "max-w-none", placeholder: "Describe your task…", models: [ { id: "minimax-m2-5", name: "MiniMax M2.5", hint: "Flagship" }, { id: "minimax-m2", name: "MiniMax M2", hint: "Fast" }, { id: "minimax-m1", name: "MiniMax M1", hint: "Reasoning" }, ], initialToggles: { search: false },}); function MiniMaxMark({ className }: { className?: string }) { return ( <svg viewBox="0 0 24 24" className={className} aria-hidden="true"> <defs> <linearGradient id="minimax-m" x1="2" y1="20" x2="22" y2="4" gradientUnits="userSpaceOnUse"> <stop stopColor="#ff3b30" /> <stop offset="0.5" stopColor="#ff7a00" /> <stop offset="1" stopColor="#ffb020" /> </linearGradient> </defs> <path d="M2 20V6h4.6l5.4 7 5.4-7H22v14h-4.4v-7.2L12 19l-5.6-6.2V20H2Z" fill="url(#minimax-m)" /> </svg> );} /** MiniMax Code: light rail, monochrome canvas, capsule composer, H3 promo card. */function MiniMaxComposeLayout() { const { toggles, toggle } = useCompose(); return ( <div className="flex min-h-[400px] w-full bg-white text-[13px] text-[#151515]"> <aside className="hidden w-[176px] shrink-0 flex-col @[560px]:flex bg-[#f5f5f4] px-2.5 py-3"> <div className="flex items-center gap-1.5 px-0.5"> <MiniMaxMark className="h-4 w-4" /> <span className="text-[12.5px] font-semibold tracking-tight">MiniMax Code</span> <PanelLeft className="ml-auto h-3.5 w-3.5 text-black/40" aria-hidden="true" /> </div> <nav className="mt-4 flex flex-col gap-0.5"> {[ { icon: Plus, label: "New task" }, { icon: Sparkles, label: "Plugins · Skills" }, { icon: PanelLeft, label: "Connect phone" }, ].map(({ icon: Icon, label }) => ( <button key={label} type="button" className="flex items-center gap-2.5 rounded-lg px-1.5 py-[6px] text-left text-[11.5px] hover:bg-black/[0.05]" > <Icon className="h-[14px] w-[14px] text-black/55" aria-hidden="true" /> {label} </button> ))} </nav> <p className="mt-4 px-1.5 text-[9px] font-medium uppercase tracking-wide text-black/35"> More </p> <div className="flex flex-col gap-0.5"> {["MaxHermes", "MaxClaw"].map((label) => ( <button key={label} type="button" className="flex items-center gap-2 rounded-lg px-1.5 py-[5px] text-left text-[11px] text-black/60 hover:bg-black/[0.05]" > <span className="h-2.5 w-2.5 rounded-sm border border-black/25" aria-hidden="true" /> {label} </button> ))} </div> <div className="mt-auto flex flex-col gap-1 px-0.5"> <button type="button" className="flex items-center gap-2 rounded-lg px-1 py-1 text-[10.5px] text-black/60" > <Download className="h-3 w-3" aria-hidden="true" /> Download desktop </button> <button type="button" className="flex items-center gap-2 rounded-lg px-1 py-1 text-[10.5px] text-black/60" > <Sparkles className="h-3 w-3" aria-hidden="true" /> View plans & pricing </button> <button type="button" className="mt-1 w-full rounded-md bg-[#141414] py-1.5 text-[11px] font-medium text-white" > Log in </button> </div> </aside> <div className="relative flex min-w-0 flex-1 flex-col bg-[#fbfbfa] px-5 pb-4 pt-3"> <div className="flex items-center justify-end gap-2"> <button type="button" className="flex items-center gap-1 rounded-md border border-black/10 bg-white px-2.5 py-1.5 text-[10.5px]" > <Download className="h-3 w-3" aria-hidden="true" /> Download </button> <button type="button" className="rounded-md bg-[#141414] px-3 py-1.5 text-[10.5px] font-medium text-white" > Log in </button> </div> <div className="my-auto flex w-full flex-col items-center"> <MiniMaxMark className="h-9 w-9" /> <h1 className="mt-2 text-center text-[23px] font-medium tracking-[-0.02em]"> What can I build for you? </h1> <div data-agent-id="compose-card" className="mt-4 flex w-full max-w-[470px] items-center gap-2 rounded-full border border-black/[0.08] 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/20 focus-within:shadow-[0_4px_18px_rgba(0,0,0,0.09)]" > <button type="button" aria-label="Attach" className="grid h-7 w-7 shrink-0 place-items-center rounded-full text-black/70 hover:bg-black/5" > <Plus className="h-[17px] w-[17px]" aria-hidden="true" /> </button> <ComposeTextarea aria-label="Send a message to MiniMax" placeholder="Describe your task…" rows={1} className="min-w-0 flex-1 px-1 py-1.5 text-[13.5px] leading-5 placeholder:text-black/35" /> <div className="flex shrink-0 items-center gap-1"> <button type="button" aria-label="Web search" aria-pressed={toggles.search} onClick={() => toggle("search")} className="grid h-7 w-7 place-items-center rounded-full text-black/40 hover:bg-black/5 aria-pressed:bg-black/[0.06] aria-pressed:text-black" > <Search className="h-3.5 w-3.5" aria-hidden="true" /> </button> <ModelChip tone="light" className="[&>button]:h-7 [&>button]:px-1 [&>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-[#2b2b2b] disabled:bg-[#e5e5e2] disabled:text-black/30 disabled:opacity-100" icon={<ArrowUp className="h-[16px] w-[16px]" strokeWidth={2.4} />} /> </div> </div> <div className="mt-3 flex w-full max-w-[470px] items-center gap-2 rounded-xl border border-black/[0.06] bg-gradient-to-r from-[#fff1ec] via-[#f6f0ff] to-[#eef4ff] px-3 py-2"> <MiniMaxMark className="h-6 w-6 shrink-0" /> <div className="min-w-0"> <p className="text-[10.5px] font-semibold">MiniMax H3 Image</p> <p className="text-[9px] text-black/50">One prompt to a finished visual.</p> </div> <button type="button" className="ml-auto shrink-0 rounded-full bg-[#141414] px-2.5 py-1 text-[9.5px] font-medium text-white" > Try it </button> </div> </div> <p className="flex items-center justify-center gap-2 text-[8.5px] text-black/30"> MiniMax can make mistakes. Check important info. <ChevronDown className="h-2.5 w-2.5" aria-hidden="true" /> </p> </div> </div> );} export function MiniMaxCompose(props: ComposeProps) { return ( <Root {...props}> <MiniMaxComposeLayout /> </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
MiniMax Code also has a full product page.
Metadata, model list, and the same block in a dedicated route.
MiniMaxCompose composes with MessageList, ChatShell, useChat, and the provider compose blocks. Browse the full reference or see all components in the gallery.
200 lines · copy-ready