본문 바로가기
명함 만들기 캐릭터 모음 16가지 디자인 · PNG / SVG / PDF

스피너

몇 초 안에 끝나고 남은 양을 셀 수 없는 기다림에만 쓰는 조각.

피드백

실제 미리보기

출처

<div class="dc-spin" role="status">
  <span class="dc-spin__ring" aria-hidden="true"></span>
  <span class="dc-spin__text">수강생 명단을 불러오는 중…</span>
</div>
.dc-spin { display: inline-flex; align-items: center; gap: var(--dc-3); font-family: var(--dc-font); }
.dc-spin__ring {
  flex: none; width: 22px; height: 22px;
  border: 3px solid color-mix(in srgb, var(--dc-brand) 22%, transparent);
  border-top-color: var(--dc-brand);
  border-radius: var(--dc-r-full);
  animation: dc-spin-turn 800ms linear infinite;
}
.dc-spin__ring--sm { width: 16px; height: 16px; border-width: 2px; }
.dc-spin__ring--lg { width: 34px; height: 34px; }
.dc-spin__ring--on {
  width: 16px; height: 16px; border-width: 2px;
  border-color: color-mix(in srgb, var(--dc-text-on) 40%, transparent);
  border-top-color: var(--dc-text-on);
}
.dc-spin__text { font-size: 14px; color: var(--dc-text); }
.dc-spin__sub { font-size: 12px; color: var(--dc-text-mute); }
.dc-spin__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--dc-2);
  min-height: 44px; padding: 0 var(--dc-5);
  border: 0; border-radius: var(--dc-r-sm);
  background: var(--dc-brand); color: var(--dc-text-on);
  font-size: 15px; font-weight: 600;
}
.dc-spin__btn[aria-disabled="true"] { opacity: .75; cursor: default; }
.dc-spin--page {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--dc-2); min-height: 190px; padding: var(--dc-6);
  border: 1px solid var(--dc-line); border-radius: var(--dc-r-md);
  background: var(--dc-surface); text-align: center;
}
@keyframes dc-spin-turn { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .dc-spin__ring { animation-duration: 1800ms !important; }
}

이렇게 씁니다

  • 무엇을 기다리는지 글자를 함께 둔다 — 도는 동그라미만으로는 아무 말도 하지 않는다
  • 10초를 넘길 일에는 스피너 대신 진행 막대나 스켈레톤을 쓴다
  • 화면 전체를 덮지 말고 내용이 바뀌는 영역 안에만 둔다

주의할 점

  • role=status 가 없으면 스크린 리더에는 아무 일도 일어나지 않는다
  • 움직임을 줄인 사용자에게는 회전을 느리게 — 아예 멈추면 기다림인지 고장인지 알 수 없다

다음에 볼 것