nnuer
강희태@gmlxo9917

광택 말풍선이 천천히 위아래로 떠다니는 효과

기타 인터랙션

광택 있는 3D 말풍선이 3.2초에 걸쳐 10px 떠올랐다 내려오기를 끝없이 반복합니다.

#float#idle#3d#loop2026. 10. 17. 업데이트

블록 신고

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

사유
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개

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