Render grouped search results as a collapsible tool card. State-driven (searching shimmer / done static). Provide a query and an optional results array. Self-contained port from 21st.dev Agent Elements.
import { SearchTool } from "@/components/ui/search-tool"; export default function Demo() { return ( <div className="flex items-center justify-center w-full min-h-screen bg-background p-8 overflow-hidden"> <div className="w-full max-w-md"> <SearchTool state="searching" query="latest GPU benchmarks" /> </div> </div> ); }
Part of Agent Elements — browse the full library on 21st.dev.