Ghost Outline Button
shadcn outline button + Framer Motion: violet border glow, subtle fill, and shadow on hover. Secondary “View components” for dark TetraKits heroes.
Dependencies
react
framer-motion
npm install framer-motion"use client";
import { motion } from "framer-motion";
export function GhostOutlineButton({ label = "View components" }: { label?: string }) {
return (
<motion.button
whileHover={{
y: -2,
scale: 1.03,
borderColor: "rgba(167,139,250,0.65)",
backgroundColor: "rgba(139,92,246,0.08)",
boxShadow: "0 0 24px rgba(139,92,246,0.15)",
}}
whileTap={{ scale: 0.97 }}
transition={{ type: "spring", stiffness: 400, damping: 22 }}
className="rounded-xl border border-zinc-600/80 bg-transparent px-5 py-2.5 text-sm font-medium text-zinc-200 backdrop-blur-sm"
>
{label}
</motion.button>
);
}
Please implement this code in the current project and add it to (Your Desired Section, e.g. homepage hero, pricing page, dashboard). Change the primary accent color to (YOUR HEX CODE COLOR, e.g. #6366F1).
Requirements:
- Use React + Tailwind CSS (match the project's existing setup)
- Install dependencies if needed: npm install framer-motion
- Keep the layout responsive on mobile and desktop
- Replace placeholder copy with content that fits the project
The UI code:
"use client";
import { motion } from "framer-motion";
export function GhostOutlineButton({ label = "View components" }: { label?: string }) {
return (
<motion.button
whileHover={{
y: -2,
scale: 1.03,
borderColor: "rgba(167,139,250,0.65)",
backgroundColor: "rgba(139,92,246,0.08)",
boxShadow: "0 0 24px rgba(139,92,246,0.15)",
}}
whileTap={{ scale: 0.97 }}
transition={{ type: "spring", stiffness: 400, damping: 22 }}
className="rounded-xl border border-zinc-600/80 bg-transparent px-5 py-2.5 text-sm font-medium text-zinc-200 backdrop-blur-sm"
>
{label}
</motion.button>
);
}
Replace (Your Desired Section) and (YOUR HEX CODE COLOR) before pasting into Cursor, Copilot, or ChatGPT.