Claude Code · Claude Opus 5.5 · React (TSX)
결과 코드펼치기
import { useEffect, useRef } from "react";
const BUBBLE = "https://nnuer.site/brand/landing/bubble.webp";
/** A glossy speech bubble that drifts up 10px and back, slowly and forever */
export default function FloatingBubble() {
const bubble = useRef<HTMLImageElement>(null);
useEffect(() => {
if (matchMedia("(prefers-reduced-motion: reduce)").matches) return;
const float = bubble.current?.animate(
[{ translate: "0 0" }, { translate: "0 -10px" }, { translate: "0 0" }],
{ duration: 3200, iterations: Infinity, easing: "ease-in-out" },
);
return () => float?.cancel();
}, []);
return (
<section className="grid w-full place-items-center bg-[#fbfbfc] px-4 py-24">
<img ref={bubble} src={BUBBLE} alt="" className="block h-auto w-[150px]" />
</section>
);
}
적용 사이트 0
이 블록이 실제로 쓰인 사이트입니다.
아직 등록된 사이트가 없습니다. 이 블록을 쓴 사이트가 있다면 알려 주세요.
재현 후기
v1 · 0개아직 이 버전의 프롬프트로 직접 만들어 본 사람이 없습니다. 첫 번째로 재현해 보세요.