nnuer
강희태@gmlxo9917

섹션 블록이 떨어져 페이지를 쌓는 빌딩 로딩

기타 블록

푸터, 카드, 히어로, 내비게이션 블록이 위에서 하나씩 떨어져 살짝 튀며 웹페이지를 쌓아 올리는 9초 주기 로딩 모션. 아래에 튀는 점 세 개와 경과 시간이 나온다.

블록 신고

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

사유
Claude Code · claude-opus-5-5 · React (TSX)
결과 코드펼치기
import { useEffect, useState } from "react";

const A = "#3182f6";
const B = "#64a8ff";
const C = "#a9d1ff";

// 무대 240x220. 블록 최종 top: 푸터 178, 카드 136, 히어로 76, 내비 56. 한 주기 9초.
const drop = (name, from, start) => {
  const s = start;
  return `@keyframes ${name}{0%${s ? `,${s}%` : ""}{transform:translateY(-${from}px);opacity:0}${s + 2}%{transform:translateY(-${from}px);opacity:1;animation-timing-function:cubic-bezier(.55,0,1,.45)}${s + 13}%{transform:translateY(0);animation-timing-function:ease-out}${s + 14.5}%{transform:translateY(-3px)}${s + 16}%{transform:translateY(0);opacity:1}86%{transform:translateY(0);opacity:1}94%,100%{transform:translateY(0);opacity:0}}`;
};

const CSS = `
@media (prefers-reduced-motion:no-preference){
.bsb-footer{animation:bsb-footer 9s linear infinite}
.bsb-cards{animation:bsb-cards 9s linear infinite}
.bsb-hero{animation:bsb-hero 9s linear infinite}
.bsb-nav{animation:bsb-nav 9s linear infinite}
.bsb-dot{animation:bsb-bounce 1.1s ease-in-out infinite}
}
${drop("bsb-footer", 184, 0)}
${drop("bsb-cards", 142, 18)}
${drop("bsb-hero", 82, 36)}
${drop("bsb-nav", 62, 54)}
@keyframes bsb-bounce{0%,100%{transform:translateY(0);opacity:.5}50%{transform:translateY(-4px);opacity:1}}
`;

export default function BuildStackLoader() {
  const [seconds, setSeconds] = useState(0);
  useEffect(() => {
    const started = Date.now();
    const timer = setInterval(() => setSeconds(Math.floor((Date.now() - started) / 1000)), 1000);
    return () => clearInterval(timer);
  }, []);

  const block = "absolute left-1/2 -ml-[75px] w-[150px] rounded-md";

  return (
    <section className="w-full bg-[#f2f4f6] px-4 py-20 sm:py-28">
      <style>{CSS}</style>
      <div role="status" aria-live="polite" className="mx-auto flex max-w-xl flex-col items-center gap-8 text-[#191f28]">
        <div className="relative h-[220px] w-[240px]" aria-hidden>
          <span className={`bsb-footer ${block} top-[178px] h-[30px]`} style={{ background: `color-mix(in srgb, ${A} 80%, #191f28)` }} />
          <span className={`bsb-cards ${block} top-[136px] flex h-9 gap-[5px]`}>
            <i className="flex-1 rounded-md" style={{ background: C }} />
            <i className="flex-1 rounded-md" style={{ background: C }} />
            <i className="flex-1 rounded-md" style={{ background: C }} />
          </span>
          <span className={`bsb-hero ${block} top-[76px] h-[54px]`} style={{ background: A }} />
          <span className={`bsb-nav ${block} top-[56px] h-[14px]`} style={{ background: B }} />
        </div>
        <div className="text-center">
          <p className="text-[19px] font-bold tracking-[-0.01em]">페이지를 짓는 중입니다</p>
          <div className="mt-2 flex items-center justify-center gap-2">
            <span className="flex gap-1" aria-hidden>
              {[A, B, C].map((c, i) => (
                <span key={c} className="bsb-dot h-1.5 w-1.5 rounded-full" style={{ background: c, animationDelay: `${i * 0.15}s` }} />
              ))}
            </span>
            <span className="font-mono text-[13px] text-[#8b95a1]">
              {Math.floor(seconds / 60)}:{String(seconds % 60).padStart(2, "0")}
            </span>
          </div>
        </div>
      </div>
    </section>
  );
}

적용 사이트 0

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

로그인하고 내 사이트 추가

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

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

재현 후기

v1 · 0개

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