1. React 컴포넌트 내보내기
작업실에서 로고를 올리고 16가지 이펙트 중 하나를 고른 뒤 React 탭에서 PixelLogoLoader.tsx를 내려받으세요(Pro 플랜).
2. Client Component로 지정하기
src/components/PixelLogoLoader.tsx 파일 첫 줄에 'use client';를 추가해 클라이언트 컴포넌트로 렌더링합니다:
'use client';
import { PixelLogoLoader } from '@/components/PixelLogoLoader';
export function HeroLogo() {
return (
<div style={{ width: '100%', maxWidth: 420, margin: '0 auto' }}>
<PixelLogoLoader
variant="mobius-flow"
height={320}
duration={3.2}
interactive
/>
</div>
);
}
3. SSR 중 CLS(레이아웃 이동) 방지
next/dynamic의 ssr: false와 고정 높이 fallback으로 깔끔한 플레이스홀더를 유지할 수 있습니다:
import dynamic from 'next/dynamic';
const PixelLogoLoader = dynamic(
() => import('@/components/PixelLogoLoader').then((m) => m.PixelLogoLoader),
{ ssr: false, loading: () => <div style={{ height: 320 }} /> }
);
4. 무료 플랜 대안
무료 플랜에서는 HTML5 파일을 public/logo-loader.html에 넣고 <iframe>으로 임베드할 수 있습니다. 전체 속성은 React 가이드를 참고하세요.