interactive-hover-button
componentry/interactive-hover-buttonFreeComponent
A button that reveals text and an arrow icon on hover.
Live preview
live · rendered by the registry
Rendered by componentry on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://componentry.dev/r/interactive-hover-button.jsonSource
1"use client"23import React from "react"4import { ArrowRight } from "lucide-react"5import { cn } from "@/lib/utils"67interface InteractiveHoverButtonProps8 extends React.ButtonHTMLAttributes<HTMLButtonElement> {9 text?: string10}1112const InteractiveHoverButton = React.forwardRef<13 HTMLButtonElement,14 InteractiveHoverButtonProps15>(({ text = "Button", className, ...props }, ref) => {16 return (17 <button18 ref={ref}19 className={cn(20 "group relative w-32 cursor-pointer overflow-hidden rounded-full border bg-background p-2 text-center font-semibold",21 className,22 )}23 {...props}24 >25 <span className="inline-block translate-x-1 transition-all duration-300 group-hover:translate-x-12 group-hover:opacity-0">26 {text}27 </span>28 <div className="absolute top-0 z-10 flex h-full w-full translate-x-12 items-center justify-center gap-2 text-primary-foreground opacity-0 transition-all duration-300 group-hover:-translate-x-1 group-hover:opacity-100">29 <span>{text}</span>30 <ArrowRight />31 </div>32 <div className="absolute left-[20%] top-[40%] h-2 w-2 scale-[1] rounded-lg bg-primary transition-all duration-300 group-hover:left-[0%] group-hover:top-[0%] group-hover:h-full group-hover:w-full group-hover:scale-[1.8] group-hover:bg-primary"></div>33 </button>34 )35})3637InteractiveHoverButton.displayName = "InteractiveHoverButton"3839export { InteractiveHoverButton }
More from componentry
All 59 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Animated Gradientanimated-gradient | componentry | Components | Free | no deps | |
| ASCII Effectascii-effect | componentry | Components | Free | no deps | |
| Aurora Flowaurora-flow | componentry | Components | Free | no deps | |
| auth-modalauth-modal | componentry | Components | Free | no deps | |
| border-beamborder-beam | componentry | Components | Free | no deps | |
| circuit-boardcircuit-board | componentry | Components | Free | no deps | |
| closing-plasmaclosing-plasma | componentry | Components | Free | no deps | |
| collection-surfercollection-surfer | componentry | Components | Free | no deps |
