nnuer
강희태@gmlxo9917

단계 번호와 단계 이름이 있는 진행 막대 헤더

기타 블록

왼쪽에 현재 단계/전체 단계, 오른쪽에 아이콘과 단계 이름, 아래에 둥근 진행 막대가 있는 단계형 흐름 상단 헤더입니다. 이전/다음 단계 버튼으로 진행 막대가 부드럽게 늘고 줄어듭니다.

#progress#stepper#wizard#header#korean2026. 10. 16. 업데이트

블록 신고

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

사유
Claude Code · 모름 · React (TSX)
결과 코드펼치기
import { useState } from "react";

const FONT_URL = "https://fonts.googleapis.com/css2?family=Gothic+A1:wght@400;500;600;700;800&display=swap";

const STEPS = ["브레인스토밍", "목표 정리", "참석자", "안건", "자료 준비", "일정", "확인"];

function SunIcon() {
  return (
    <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="#f5a524" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
      <circle cx="12" cy="12" r="4" fill="#fcd34d" />
      <path d="M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41" />
    </svg>
  );
}

export default function StepProgressHeader() {
  const [step, setStep] = useState(1);
  const total = STEPS.length;
  const percent = (step / total) * 100;

  return (
    <section className="w-full bg-[#f8f8fb] px-4 py-10 font-['Gothic_A1',sans-serif] sm:px-6">
      <link rel="stylesheet" href={FONT_URL} precedence="default" />
      <div className="mx-auto flex w-full max-w-[800px] flex-col gap-3">
        <div className="flex items-center justify-between gap-4 text-[16px] leading-normal">
          <p className="font-bold text-[#4361ee]" aria-live="polite">
            {step} / {total}
          </p>
          <p className="flex items-center gap-1.5 font-medium text-[#1a1d1f]">
            <SunIcon />
            {STEPS[step - 1]}
          </p>
        </div>
        <div
          className="h-2 w-full overflow-hidden rounded-[4px] bg-[#e9e9f2]"
          role="progressbar"
          aria-label="진행 단계"
          aria-valuemin={1}
          aria-valuemax={total}
          aria-valuenow={step}
        >
          <div
            className="h-full rounded-[4px] bg-[#4361ee] transition-[width] duration-300 ease-out"
            style={{ width: `${percent}%` }}
          />
        </div>
        <div className="mt-4 flex justify-end gap-2">
          <button
            type="button"
            onClick={() => setStep((s) => Math.max(1, s - 1))}
            disabled={step === 1}
            className="rounded-lg border border-[#eeeef2] bg-white px-3 py-1.5 text-[13px] font-semibold text-[#6f767e] transition-colors hover:bg-[#f4f4f7] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[#4361ee] disabled:cursor-not-allowed disabled:opacity-40"
          >
            이전 단계
          </button>
          <button
            type="button"
            onClick={() => setStep((s) => Math.min(total, s + 1))}
            disabled={step === total}
            className="rounded-lg bg-[#4361ee] px-3 py-1.5 text-[13px] font-semibold text-white transition-colors hover:bg-[#3651d4] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[#4361ee] disabled:cursor-not-allowed disabled:opacity-40"
          >
            다음 단계
          </button>
        </div>
      </div>
    </section>
  );
}

적용 사이트 0

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

로그인하고 내 사이트 추가

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

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

재현 후기

v1 · 0개

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