08쌓이는 큐브
같은 크기의 정사각 네 개가 아래에서부터 차례로 살짝 떠오르며 자리를 잡고 한 박자 뒤 전부가 함께 내려앉아, 블록을 조립하는 로딩 리듬을 만듭니다.
쓰임모듈 로딩 단계 표시, 빌드 대기 화면
scalestagger$easing

<main class="stage">
<div class="cs-grid is-demo" aria-hidden="true">
<span class="cs-cell"><span class="cs-cube"></span></span>
<span class="cs-cell"><span class="cs-cube"></span></span>
<span class="cs-cell"><span class="cs-cube"></span></span>
<span class="cs-cell"><span class="cs-cube"></span></span>
</div>
</main>@use "../../../../site/static/demo-tokens" as *;
// ── 변수 3개 ──────────────────────────────────────────
$duration: 2s;
$easing: $ease-pop;
$color: $subject-lilac;
@include stage($stage-paper);
.cs-grid {
display: grid;
grid-template-columns: repeat(2, 56px);
grid-auto-rows: 56px;
gap: $sp-3;
}
.cs-cell {
display: grid;
place-items: center;
}
// 실사용: 로딩 중에만 .is-loading — 등장(안쪽 큐브 scale)은 하나씩,
// 착지(바깥 셀 translate)는 전부 같은 박자에
.cs-cube {
width: 48px;
height: 48px;
border-radius: $r-control;
background: $color;
box-shadow: $shadow-press;
}
.is-loading .cs-cell,
.is-demo .cs-cell {
animation: cs-settle $duration $easing infinite;
}
.is-loading .cs-cube,
.is-demo .cs-cube {
animation: cs-pop $duration $easing infinite backwards;
}
.is-loading .cs-cell:nth-child(1) .cs-cube,
.is-demo .cs-cell:nth-child(1) .cs-cube { animation-delay: 0s; }
.is-loading .cs-cell:nth-child(2) .cs-cube,
.is-demo .cs-cell:nth-child(2) .cs-cube { animation-delay: 120ms; }
.is-loading .cs-cell:nth-child(3) .cs-cube,
.is-demo .cs-cell:nth-child(3) .cs-cube { animation-delay: 240ms; }
.is-loading .cs-cell:nth-child(4) .cs-cube,
.is-demo .cs-cell:nth-child(4) .cs-cube { animation-delay: 360ms; }
@keyframes cs-pop {
0% { transform: scale(0); opacity: 0; }
16% { transform: scale(1.18); opacity: 1; }
22%, 68% { transform: scale(1); opacity: 1; }
90%, 100% { transform: scale(0); opacity: 0; }
}
@keyframes cs-settle {
0%, 60% { transform: translateY(0); }
70% { transform: translateY(8px); }
80%, 100% { transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
.is-loading .cs-cell,
.is-loading .cs-cube,
.is-demo .cs-cell,
.is-demo .cs-cube {
animation: none !important;
transform: none !important;
opacity: 1 !important;
}
}html, body {
margin: 0;
overflow: hidden;
}
.stage {
box-sizing: border-box;
min-height: 100vh;
display: grid;
place-items: center;
margin: 0;
background: #ffffff;
font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
padding: clamp(8px, 4vw, 24px);
}
.cs-grid {
display: grid;
grid-template-columns: repeat(2, 56px);
grid-auto-rows: 56px;
gap: 12px;
}
.cs-cell {
display: grid;
place-items: center;
}
.cs-cube {
width: 48px;
height: 48px;
border-radius: 12px;
background: #b9a0ff;
box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
}
.is-loading .cs-cell,
.is-demo .cs-cell {
animation: cs-settle 2s cubic-bezier(0.2, 1.4, 0.4, 1) infinite;
}
.is-loading .cs-cube,
.is-demo .cs-cube {
animation: cs-pop 2s cubic-bezier(0.2, 1.4, 0.4, 1) infinite backwards;
}
.is-loading .cs-cell:nth-child(1) .cs-cube,
.is-demo .cs-cell:nth-child(1) .cs-cube {
animation-delay: 0s;
}
.is-loading .cs-cell:nth-child(2) .cs-cube,
.is-demo .cs-cell:nth-child(2) .cs-cube {
animation-delay: 120ms;
}
.is-loading .cs-cell:nth-child(3) .cs-cube,
.is-demo .cs-cell:nth-child(3) .cs-cube {
animation-delay: 240ms;
}
.is-loading .cs-cell:nth-child(4) .cs-cube,
.is-demo .cs-cell:nth-child(4) .cs-cube {
animation-delay: 360ms;
}
@keyframes cs-pop {
0% {
transform: scale(0);
opacity: 0;
}
16% {
transform: scale(1.18);
opacity: 1;
}
22%, 68% {
transform: scale(1);
opacity: 1;
}
90%, 100% {
transform: scale(0);
opacity: 0;
}
}
@keyframes cs-settle {
0%, 60% {
transform: translateY(0);
}
70% {
transform: translateY(8px);
}
80%, 100% {
transform: translateY(0);
}
}
@media (prefers-reduced-motion: reduce) {
.is-loading .cs-cell,
.is-loading .cs-cube,
.is-demo .cs-cell,
.is-demo .cs-cube {
animation: none !important;
transform: none !important;
opacity: 1 !important;
}
}import { CSSProperties } from "react";
import styles from "./CubeStack.module.scss";
type Vars = CSSProperties & {
"--duration"?: string;
"--easing"?: string;
"--color"?: string;
};
export interface CubeStackProps {
duration?: string;
easing?: string;
color?: string;
}
export default function CubeStack({
duration = "2s",
easing = "cubic-bezier(.2, 1.4, .4, 1)",
color = "#b9a0ff",
}: CubeStackProps) {
const style: Vars = {
"--duration": duration,
"--easing": easing,
"--color": color,
};
return (
<div className={styles.grid} style={style} aria-hidden="true">
{[0, 1, 2, 3].map((i) => (
<span key={i} className={`${styles.cell} ${styles["d" + i]}`}>
<span className={styles.cube} />
</span>
))}
</div>
);
}08 쌓이는 큐브 — 측정 누적면적 13.051% · 움직인 프레임 18/23GODRICH 원작 · zip 에 SCSS·React 포함 · 로딩페이지 디자인 9종 — 복붙하는 예쁜 CSS 로딩 화면
이 데모가 속한 글
로딩페이지 디자인 9종 — 복붙하는 예쁜 CSS 로딩 화면로딩페이지 디자인은 서비스가 켜지는 첫 순간에 사용자에게 "기다리고 있네"라고 말해주는 화면입니다. 기본 스피너 하나로도 되지만, 파스텔 링이나 차오르는 물처럼 예쁜 로딩 화면은 복붙 몇 줄로 사이트 인상을 바꿔 놓 이 글의 데모 전부 보기


