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

설정 목록

켜고 끄기·고르기처럼 설정 한 덩어리를 묶어서 보여 줄 때 쓰는 조각.

정보 표시

실제 미리보기

출처

<section class="dc-stg">
  <h2 class="dc-stg__head">알림</h2>
  <ul class="dc-stg__group">
    <li class="dc-stg__row">
      <span class="dc-stg__main">
        <label class="dc-stg__label" for="dc-stg-assign">작업 배정 알림</label>
        <span class="dc-stg__desc">새 배정이 생기면 바로 알려 줍니다</span>
      </span>
      <input class="dc-stg__switch" type="checkbox" role="switch" id="dc-stg-assign" checked>
    </li>
    <li class="dc-stg__row">
      <span class="dc-stg__main">
        <label class="dc-stg__label" for="dc-stg-night">야간 방해 금지</label>
        <span class="dc-stg__desc">밤 10시부터 아침 7시까지 소리를 끕니다</span>
      </span>
      <input class="dc-stg__switch" type="checkbox" role="switch" id="dc-stg-night">
    </li>
    <li class="dc-stg__row dc-stg__row--link">
      <a class="dc-stg__open" href="#">
        <span class="dc-stg__label">알림 소리</span>
        <span class="dc-stg__value">기본음</span>
        <span class="dc-stg__arrow" aria-hidden="true">›</span>
      </a>
    </li>
  </ul>
</section>
.dc-stg {
  padding: var(--dc-4) 0 var(--dc-5);
  background: var(--dc-bg);
  font-family: var(--dc-font);
}
.dc-stg__head {
  margin: 0 0 var(--dc-2); padding: 0 var(--dc-4);
  font-size: 12px; font-weight: 700; letter-spacing: .02em;
  color: var(--dc-text-mute);
}
.dc-stg__group {
  margin: 0; padding: 0; list-style: none;
  background: var(--dc-surface);
  border-top: 1px solid var(--dc-line);
  border-bottom: 1px solid var(--dc-line);
}
.dc-stg__row {
  display: flex; align-items: center; gap: var(--dc-3);
  min-height: 60px; padding: var(--dc-3) var(--dc-4);
}
.dc-stg__row + .dc-stg__row { border-top: 1px solid var(--dc-line); }
.dc-stg__row--link { padding: 0; }
.dc-stg__main {
  flex: 1 1 auto; min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.dc-stg__label { font-size: 15px; color: var(--dc-text); cursor: pointer; }
.dc-stg__desc { font-size: 12px; line-height: 1.5; color: var(--dc-text-mute); }
.dc-stg__switch {
  position: relative; flex: 0 0 auto;
  appearance: none; -webkit-appearance: none;
  width: 52px; height: 32px; margin: 0; border: none;
  border-radius: var(--dc-r-full);
  background: var(--dc-line-field);
  cursor: pointer;
  transition: background var(--dc-fast);
}
.dc-stg__switch::before { content: ""; position: absolute; inset: -6px; }
.dc-stg__switch::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 26px; height: 26px; border-radius: var(--dc-r-full);
  background: var(--dc-surface); box-shadow: var(--dc-sh-1);
  transition: transform var(--dc-fast);
}
.dc-stg__switch:checked { background: var(--dc-brand); }
.dc-stg__switch:checked::after { transform: translateX(20px); }
.dc-stg__open {
  flex: 1 1 auto; display: flex; align-items: center; gap: var(--dc-2);
  min-height: 60px; padding: var(--dc-3) var(--dc-4);
  color: inherit; text-decoration: none;
  transition: background var(--dc-fast);
}
.dc-stg__open:active { background: var(--dc-sunken); }
.dc-stg__open .dc-stg__label { flex: 1 1 auto; }
.dc-stg__open--danger .dc-stg__label { color: var(--dc-danger); font-weight: 700; }
.dc-stg__value { font-size: 14px; color: var(--dc-text-mute); }
.dc-stg__arrow { font-size: 20px; line-height: 1; color: var(--dc-text-mute); }
.dc-stg__check { font-size: 16px; font-weight: 700; color: var(--dc-brand-text); }
.dc-stg__note {
  margin: var(--dc-3) 0 0; padding: 0 var(--dc-4);
  font-size: 12px; line-height: 1.6; color: var(--dc-text-mute);
}

이렇게 씁니다

  • 비슷한 설정끼리 묶고, 묶음마다 짧은 제목을 붙인다
  • 켜고 끄기는 스위치로, 여러 개 중 하나 고르기는 값과 화살표로 둔다
  • 바꾸면 바로 저장된다 — 아래에 저장 버튼을 따로 두지 않는다

주의할 점

  • 스위치에는 label 을 연결한다 — 글자를 눌러도 켜지고 꺼져야 한다
  • 위험한 줄(로그아웃·계정 삭제)은 맨 아래 따로 떼어 놓는다

다음에 볼 것