/Click feedback
Click feedback • CSS
Contact Reveal Button
A circular arrow and label that resolve into a polished contact pill 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/contact-reveal-button.jsonCode
TypeScript component
1import { ArrowRight } from "lucide-react";23export function ContactRevealButton() {4return (5<button type="button" className="contact-reveal">6<span className="contact-reveal-icon" aria-hidden="true">7<ArrowRight size={18} strokeWidth={2.5} />8</span>9<span>Get in touch</span>10</button>11);12}
CSS
1.contact-reveal {2position: relative;3display: inline-flex;4align-items: center;5gap: 10px;6box-sizing: border-box;7width: 145px;8overflow: hidden;9border: 0;10border-radius: 999px;11padding: 0 15px 0 0;12background: transparent;13color: #f0f0f0;14font-size: 13px;15font-weight: 500;16line-height: 1;17transition: color .28s ease;18}19.contact-reveal::before {20content: "";21position: absolute;22inset: 0 auto 0 0;23width: 36px;24border-radius: inherit;25background: #f0f0f0;26transition: width .32s cubic-bezier(.4, 0, .2, 1);27}28.contact-reveal-icon,29.contact-reveal > span:last-child {30position: relative;31z-index: 1;32}33.contact-reveal-icon {34display: grid;35place-items: center;36width: 36px;37height: 36px;38flex: none;39border-radius: 50%;40color: #111;41transition: background-color .2s ease .12s;42}43.contact-reveal:hover::before,44.contact-reveal:focus-visible::before {45width: 100%;46}47.contact-reveal:hover .contact-reveal-icon,48.contact-reveal:focus-visible .contact-reveal-icon {49background: #f97316;50}51.contact-reveal:hover,52.contact-reveal:focus-visible {53color: #111;54}55.contact-reveal:focus-visible {56outline: 2px solid #f97316;57outline-offset: 4px;58}