/Click feedback
Click feedback • CSS
Projects Arrow Button
A Projects label paired with an outlined circular arrow that slides through itself on hover.
Installation
Requires lucide-react for its icons. The shadcn CLI installs it for you; copying the code by hand means installing it yourself.
Terminal
npx shadcn@latest add https://microkit.co/r/projects-arrow-button.jsonCode
TypeScript component
1import { ArrowRight } from "lucide-react";23export function ProjectsArrowButton() {4return (5<button type="button" className="projects-arrow-button">6<span>Projects</span>7<span className="projects-arrow-icon" aria-hidden="true">8<ArrowRight className="projects-arrow projects-arrow-current" size={18} strokeWidth={2.4} />9<ArrowRight className="projects-arrow projects-arrow-incoming" size={18} strokeWidth={2.4} />10</span>11</button>12);13}
CSS
1.projects-arrow-button {2display: inline-flex;3align-items: center;4gap: 9px;5border: 0;6background: transparent;7color: #f0f0f0;8font-size: 16px;9font-weight: 500;10letter-spacing: .5px;11}12.projects-arrow-icon {13position: relative;14display: grid;15width: 32px;16height: 32px;17place-items: center;18overflow: hidden;19border: 1px solid currentColor;20border-radius: 999px;21}22.projects-arrow {23position: absolute;24transition: transform .48s cubic-bezier(.16, 1, .3, 1);25}26.projects-arrow-incoming {27transform: translateX(-25px);28}29.projects-arrow-button:hover .projects-arrow-current, .projects-arrow-button:focus-visible .projects-arrow-current {30transform: translateX(25px);31}32.projects-arrow-button:hover .projects-arrow-incoming, .projects-arrow-button:focus-visible .projects-arrow-incoming {33transform: translateX(0);34}35.projects-arrow-button:focus-visible {36outline: 2px solid #f97316;37outline-offset: 4px;38}