Choice
Choice UI는 사용자가 항목을 선택할 수 있도록 하는 UI 컴포넌트로,
체크박스(Checkbox)나 라디오 버튼(Radio) 형태로 구성됩니다.
States
| Type / State | Default | :checked | :disabled | is-readonly | is-error |
|---|---|---|---|---|---|
| checkbox |
|
|
|
|
|
| radio |
|
|
|
|
|
<div class="choice is-readonly is-error">
<input type="checkbox" id="아이디" checked disabled>
<label for="아이디">
<span class="custom-mark"></span>
<span class="choice-label">텍스트</span>
</label>
</div>
<div class="choice is-readonly is-error">
<input type="radio" id="아이디" checked disabled>
<label for="아이디">
<span class="custom-mark"></span>
<span class="choice-label">텍스트</span>
</label>
</div>
is-readonly은 임의로 정의한 스타일 입니다.
Choice-chip
체크박스를 칩 형태로 표시하는 변형 패턴입니다. 네이밍은 choice-chip을 사용하고, 변형은 is-filled로 표현합니다.
| default (unselect) | filled | select | disabled |
|---|---|---|---|
|
|
|
|
|
<div class="choice-chip is-filled">
<input type="checkbox" id="chip-id">
<label for="chip-id">
<span class="choice-label">학교급</span>
<i class="icon icon-check is-sm" aria-hidden="true"></i>
</label>
</div>