Every AI tool has one thing in common — a beautiful, glowing input box that makes you want to type in it.
ChatGPT has it. Perplexity has it. Now you can have it too — built with pure Tailwind CSS. 🎁
What I Built
AI-Style Glowing Prompt Input — an ultra-modern, dark-themed input field featuring:
✅ Dynamic blurred gradient glow on focus (pink-to-purple)
✅ CSS-only animation using Tailwind's group-focus-within
✅ Sleek keyboard shortcut badges
✅ Link/prompt icon on the left
✅ Purple "Send" button with arrow icon on the right
✅ Dark theme with premium dark background
✅ Zero JavaScript — pure Tailwind CSS
✅ Perfect for AI prompt boxes, global search bars, and chat interfaces
The Design Breakdown
The Glowing Gradient Border
The centerpiece — when focused, a pink-to-purple blurred gradient glow appears around the input. This is achieved with Tailwind's group-focus-within utility — no JavaScript, no custom CSS, just utility classes.
CSS-Only Animation
The entire glow effect is pure CSS transitions. The group wrapper detects when any child element is focused and applies group-focus-within: styles to the glow layer — elegant and performant.
The AI Aesthetic
Dark background + gradient glow + purple send button = that instantly recognizable "AI tool" feel. Users associate this design with modern, intelligent interfaces — building trust before they even type.
Keyboard Shortcut Badges
Sleek shortcut badges give the input a professional, power-user feel — the kind of detail you see in tools like Linear, Raycast, and Notion.
The Tailwind Magic
Tailwind's group-focus-within is the hero here — it lets the parent div react to focus events on any child element, enabling the entire glow animation with zero JavaScript.
Where to Use This
AI tools — prompt input boxes
SaaS dashboards — global search bars
Chat interfaces — message input fields
Portfolio sites — contact or search forms that stand out
Get the Free Code
👉 Get the free code → AI-Style Glowing Prompt Input
No sign-up required. Copy, paste, ship. 🚀
What is CodeBar Library?
CodeBar Library is a growing collection of free and premium UI components built for developers who care about design quality.
Available tech stacks:
HTML/CSS
Tailwind CSS
React
Framer Motion
GSAP animations
Bootstrap
Everything is production-ready and copy-paste friendly. Whether you're building a portfolio, a SaaS product, or a client project — there's something for you.
What's Coming Next?
🔨 Full Stack Project Starter Kits
🎨 Premium UI Templates (Landing Pages, Dashboards)
⚡ More free Tailwind components every week
Drop a ❤️ if you found this useful and follow for more free components every week!
Building an AI tool and using this? Drop a link in the comments! 👇
→ Browse all free components at CodeBar Library
Top comments (0)