nnuer
강희태@gmlxo9917

보라 링이 계속 퍼져 나가는 검정 알약 버튼

버튼 인터랙션

검정 알약 버튼 둘레에서 보라색 링이 18px까지 퍼지며 사라지기를 1.8초마다 반복해 시선을 끄는 버튼입니다. 누르면 살짝 작아집니다.

#pulse#ring#cta#pill2026. 10. 17. 업데이트

블록 신고

운영자가 확인한 뒤 필요하면 블록을 숨깁니다.

사유
Claude Code · Claude Opus 5.5 · React (TSX)
결과 코드펼치기
import { useEffect, useRef } from "react";

/** A black pill button with a violet ring that keeps spreading out from it and fading */
export default function RingPulseButton() {
  const button = useRef<HTMLAnchorElement>(null);

  useEffect(() => {
    if (matchMedia("(prefers-reduced-motion: reduce)").matches) return;
    const ring = button.current?.animate(
      [{ boxShadow: "0 0 0 0 rgba(124, 58, 237, 0.45)" }, { boxShadow: "0 0 0 18px rgba(124, 58, 237, 0)" }],
      { duration: 1800, delay: 1000, iterations: Infinity, easing: "ease-out" },
    );
    return () => ring?.cancel();
  }, []);

  return (
    <section className="grid w-full place-items-center bg-[#fbfbfc] px-4 py-24">
      <a
        ref={button}
        href="#"
        className="inline-flex h-[50px] items-center justify-center whitespace-nowrap rounded-full bg-[#111114] px-[26px] text-[16px] font-semibold text-white transition-[transform,background-color] duration-150 hover:bg-[#2a2a31] focus-visible:outline-2 focus-visible:outline-offset-[3px] focus-visible:outline-[#7c3aed] active:scale-[0.97]"
      >
        첫 블록 올리기
      </a>
    </section>
  );
}

적용 사이트 0

이 블록이 실제로 쓰인 사이트입니다.

로그인하고 내 사이트 추가

아직 등록된 사이트가 없습니다. 이 블록을 쓴 사이트가 있다면 알려 주세요.

로그인하고 재현 결과 올리기

재현 후기

v1 · 0개

아직 이 버전의 프롬프트로 직접 만들어 본 사람이 없습니다. 첫 번째로 재현해 보세요.