/Click feedback
Click feedback • CSS
Get Started Circle Swap
A bordered CTA whose orange circle exits right as a directional arrow slides into place.
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/get-started-circle-swap.jsonCode
TypeScript component
1import "./styles.css";23import { ArrowRight } from "lucide-react";45export function GetStartedCircleSwap() {6return (7<button type="button" className="get-started-circle-swap">8<span className="get-started-circle-swap__label">Get started</span>9<span className="get-started-circle-swap__circle" aria-hidden="true" />10<span className="get-started-circle-swap__arrow" aria-hidden="true">11<ArrowRight size={19} strokeWidth={2.4} />12</span>13</button>14);15}
CSS
1.get-started-circle-swap,2.get-started-circle-swap * {3box-sizing: border-box;4}5.get-started-circle-swap {6appearance: none;7position: relative;8display: inline-flex;9width: min(170px, calc(100vw - 40px));10height: 50px;11align-items: center;12overflow: hidden;13border: 1px solid #48484f;14border-radius: 999px;15background: #15151b;16padding: 0 52px 0 20px;17color: #f7f7fa;18font-family: Arial, Helvetica, sans-serif;19cursor: pointer;20transition: border-color .3s ease, background-color .3s ease;21}22.get-started-circle-swap__label {23white-space: nowrap;24font-size: 15px;25font-weight: 400;26letter-spacing: -.35px;27line-height: 1;28text-transform: uppercase;29}30.get-started-circle-swap__circle,31.get-started-circle-swap__arrow {32position: absolute;33right: 9px;34top: 50%;35width: 30px;36height: 30px;37border-radius: 50%;38}39.get-started-circle-swap__circle {40right: 14px;41width: 20px;42height: 20px;43background: #f97316;44transform: translate(0, -50%);45transition: transform .42s cubic-bezier(.16, 1, .3, 1);46}47.get-started-circle-swap__arrow {48display: grid;49place-items: center;50color: #f7f7fa;51transform: translate(-24px, -50%);52opacity: 0;53transition: opacity .18s ease, transform .42s cubic-bezier(.16, 1, .3, 1);54}55.get-started-circle-swap:hover,56.get-started-circle-swap:focus-visible {57border-color: #5a5a62;58background: #18181e;59}60.get-started-circle-swap:hover .get-started-circle-swap__circle,61.get-started-circle-swap:focus-visible .get-started-circle-swap__circle {62transform: translate(42px, -50%);63}64.get-started-circle-swap:hover .get-started-circle-swap__arrow,65.get-started-circle-swap:focus-visible .get-started-circle-swap__arrow {66opacity: 1;67transform: translate(0, -50%);68}69.get-started-circle-swap:focus-visible {70outline: 2px solid #f97316;71outline-offset: 4px;72}73@media (prefers-reduced-motion: reduce) {74.get-started-circle-swap,75.get-started-circle-swap__circle,76.get-started-circle-swap__arrow {77transition: none;78}79}