FreeInputs
Command Search
Use this for documentation search, component libraries, product dashboards, and quick-action panels.
ReactTailwind CSSMotionInput
Search components...
MVP calculator
Hero section
Pricing card
Overview
A command-palette style search card with animated suggestion rows.
Framework
React
Styling
Tailwind CSS
Animation
Motion
Create a Vite React project
bashnpm create vite@latest my-ui-app -- --template react-ts
cd my-ui-app
npm installCreate a Next.js project
bashnpx create-next-app@latest my-ui-app --typescript --tailwind --eslint
cd my-ui-appAdd Tailwind CSS to Vite
bashnpm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -pInstall dependencies
bashnpm install framer-motionUsage
tsx<CommandSearch />Command Search.tsx
tsx"use client";
import { motion } from "framer-motion";
const suggestions = ["MVP calculator", "Hero section", "Pricing card"];
export function CommandSearch() {
return (
<div className="w-full max-w-md rounded-xl border border-white/10 bg-zinc-950 p-3 text-white shadow-2xl shadow-black/20">
<div className="rounded-lg border border-white/10 bg-black px-4 py-3 text-sm text-zinc-500">
Search components...
</div>
<div className="mt-3 space-y-2">
{suggestions.map((item, index) => (
<motion.div
key={item}
initial={{ opacity: 0, y: 8 }}
whileInView={{ opacity: 1, y: 0 }}
viewport={{ once: true }}
transition={{ delay: index * 0.08 }}
className="rounded-lg px-3 py-2 text-sm hover:bg-white/10"
>
{item}
</motion.div>
))}
</div>
</div>
);
}