Components
Quick prompt chips for AI chat input — text-only or with icons. Self-contained port from 21st.dev Agent Elements.
npx shadcn@latest add https://21st.dev/r/21stdev/suggestionsLoading preview...
import { Suggestions } from "@/components/ui/suggestions";
const items = [
{ id: "write", label: "Write" },
{ id: "learn", label: "Learn" },
{ id: "code", label: "Code" },
{ id: "calendar", label: "From Calendar" },
];
export default function Demo() {
return (
<div className="flex h-full w-full items-center justify-center p-8">
<Suggestions
items={items}
onSelect={(item) => console.log(item)}
className="justify-center"
/>
</div>
);
}
Loading preview...