Metal Prompt Bar
Overview
An AI prompt bar with a live liquid-metal send button that reflects onto the chips beside it.
This input component is intended for interfaces that need an AI prompt bar with a live liquid-metal send button that reflects onto the chips beside it, forms, and search workflows. Its implementation is provided as editable source so the final behavior and styling stay inside your project.
Technologies
Detected package dependencies: metal-fx, lucide-react.
Type and press Enter — in dark mode the chips reflect the send ring.
Installation
Usage
import { MetalPromptBar } from "@/components/spectrumui/metal-prompt-bar"<MetalPromptBar
chips={["Agent", "Auto", "Tools"]}
onSubmit={(text) => ask(text)}
/>API Reference
MetalPromptBar
The composer from the metal-fx showcase, wired for React: an auto-growing textarea, Enter to send and Shift+Enter for newlines, and a send button wrapped in MetalFx. The chips are passed as reflection targets, so in dark mode they pick up a soft mirrored glint of the ring.
| Prop | Type | Default | Description |
|---|---|---|---|
placeholder | string | "Build anything…" | Placeholder for the empty composer |
chips | string[] | ["Agent", "Auto"] | Pills shown bottom-left; each one reflects the ring in dark mode |
preset | "chromatic" | "silver" | "gold" | "chromatic" | Metal palette for the send ring |
theme | "auto" | "dark" | "light" | "auto" | auto follows a .dark/.light class on <html>, then the OS preference |
onSubmit | (text: string) => void | - | Fires with the trimmed text on Enter or the send button; the field clears afterwards |
onChipClick | (chip: string) => void | - | Fires when a chip is clicked |
maxRows | number | 6 | Max textarea rows before it scrolls |
className | string | - | Classes for the outer card |
Use cases
- interfaces that need an AI prompt bar with a live liquid-metal send button that reflects onto the chips beside it
- forms
- search workflows
Features
- Copy-paste source that remains in your repository
- TypeScript source included with the component
- Tailwind CSS classes editable in the component source
- Spectrum UI registry dependencies: @spectrumui/use-surface-theme
- Responsive Tailwind variants present in the source
Accessibility
- The source includes ARIA attributes or roles; preserve them when customizing the component.
- The source includes keyboard event handling; verify it alongside pointer behavior.
- Test focus order, keyboard operation, labels, contrast, and screen-reader output in the final application context.
Customization
- Edit the Tailwind utility classes in the copied source to match your spacing, color, and typography tokens.
- Use the documented className surface for local layout adjustments, then edit the source for structural changes.
Related components
Metal Prompt Bar FAQ
Is Metal Prompt Bar free to use in commercial projects?
Yes. The public Metal Prompt Bar source is available under the Apache License 2.0, including for commercial use, subject to the LICENSE terms.
How do I install Metal Prompt Bar?
Run npx shadcn@latest add @spectrumui/metal-prompt-bar. The page also exposes the source for manual installation.
Does Metal Prompt Bar require Motion?
No Motion dependency was detected in the documented source or registry entry for Metal Prompt Bar.
Does Metal Prompt Bar use shadcn/ui or Radix UI?
No shadcn/ui or Radix UI dependency was detected in the documented Metal Prompt Bar source.
Can I use Metal Prompt Bar in Next.js?
The documented React source is used in this Next.js application. Keep its use client directive when copying it into the App Router. Install the detected dependencies and verify any application-specific data or image configuration.
What accessibility checks should I run for Metal Prompt Bar?
The source includes ARIA markup, keyboard handlers. Test the finished interface with keyboard and screen-reader workflows.