칩
필터나 삭제할 수 있는 값을 나타내는 작은 알약 모양의 컴포넌트입니다.
이 페이지의 내용
칩은 선택지나 값을 나타내는 작은 알약 모양의 컴포넌트입니다. 양끝이 정확한 반원이어서 배지와 구분됩니다. 배지는 정보를 표시하고, 칩은 조작할 수 있습니다. 필터 칩은 네이티브 체크박스나 라디오 버튼을 감싸는 <label>입니다. 기본 상태에서는 표면이 살짝 올라와 있고, 선택하면 체크박스처럼 잉크 색으로 채워집니다.
칩
<fieldset class="flex flex-wrap gap-xs m(0) p(0) b(0)"> <legend class="mb-xs text-sm fg-text-strong">Topics</legend> <label class="chip"> <input type="checkbox" class="chip-input" name="topic" value="design" checked>Design </label> <label class="chip"> <input type="checkbox" class="chip-input" name="topic" value="engineering">Engineering </label> <label class="chip"> <input type="checkbox" class="chip-input" name="topic" value="research" checked>Research </label> <label class="chip"> <input type="checkbox" class="chip-input" name="topic" value="legal" disabled>Legal </label></fieldset><fieldset className="flex flex-wrap gap-xs m(0) p(0) b(0)"> <legend className="mb-xs text-sm fg-text-strong">Topics</legend> <label className="chip"> <input type="checkbox" className="chip-input" name="topic" value="design" defaultChecked />Design </label> <label className="chip"> <input type="checkbox" className="chip-input" name="topic" value="engineering" />Engineering </label> <label className="chip"> <input type="checkbox" className="chip-input" name="topic" value="research" defaultChecked />Research </label> <label className="chip"> <input type="checkbox" className="chip-input" name="topic" value="legal" disabled />Legal </label></fieldset><fieldset class="flex flex-wrap gap-xs m(0) p(0) b(0)"> <legend class="mb-xs text-sm fg-text-strong">Topics</legend> <label class="chip"> <input type="checkbox" class="chip-input" name="topic" value="design" checked>Design </label> <label class="chip"> <input type="checkbox" class="chip-input" name="topic" value="engineering">Engineering </label> <label class="chip"> <input type="checkbox" class="chip-input" name="topic" value="research" checked>Research </label> <label class="chip"> <input type="checkbox" class="chip-input" name="topic" value="legal" disabled>Legal </label></fieldset><template> <fieldset class="flex flex-wrap gap-xs m(0) p(0) b(0)"> <legend class="mb-xs text-sm fg-text-strong">Topics</legend> <label class="chip"> <input type="checkbox" class="chip-input" name="topic" value="design" checked>Design </label> <label class="chip"> <input type="checkbox" class="chip-input" name="topic" value="engineering">Engineering </label> <label class="chip"> <input type="checkbox" class="chip-input" name="topic" value="research" checked>Research </label> <label class="chip"> <input type="checkbox" class="chip-input" name="topic" value="legal" disabled>Legal </label> </fieldset></template>#단일 선택
라디오 버튼이 같은 name 값을 공유하면 칩을 하나만 선택할 수 있으며, 방향키로 칩 사이를 이동합니다. 선택지가 적고 선택 즉시 화면이 바뀌는 경우에 사용하세요. 폼에서 값을 고를 때는 세그먼트 컨트롤이 하나의 컨트롤로 인식됩니다.
단일 선택
<div class="flex flex-wrap gap-xs" role="radiogroup" aria-label="Period"> <label class="chip"><input type="radio" class="chip-input" name="period" checked>Today</label> <label class="chip"><input type="radio" class="chip-input" name="period">7 days</label> <label class="chip"><input type="radio" class="chip-input" name="period">30 days</label> <label class="chip"><input type="radio" class="chip-input" name="period">All time</label></div><div className="flex flex-wrap gap-xs" role="radiogroup" aria-label="Period"> <label className="chip"> <input type="radio" className="chip-input" name="period" defaultChecked />Today </label> <label className="chip"><input type="radio" className="chip-input" name="period" />7 days</label> <label className="chip"><input type="radio" className="chip-input" name="period" />30 days</label> <label className="chip"> <input type="radio" className="chip-input" name="period" />All time </label></div><div class="flex flex-wrap gap-xs" role="radiogroup" aria-label="Period"> <label class="chip"><input type="radio" class="chip-input" name="period" checked>Today</label> <label class="chip"><input type="radio" class="chip-input" name="period">7 days</label> <label class="chip"><input type="radio" class="chip-input" name="period">30 days</label> <label class="chip"><input type="radio" class="chip-input" name="period">All time</label></div><template> <div class="flex flex-wrap gap-xs" role="radiogroup" aria-label="Period"> <label class="chip"><input type="radio" class="chip-input" name="period" checked>Today</label> <label class="chip"><input type="radio" class="chip-input" name="period">7 days</label> <label class="chip"><input type="radio" class="chip-input" name="period">30 days</label> <label class="chip"><input type="radio" class="chip-input" name="period">All time</label> </div></template>#값
입력 요소가 없는 칩은 수신자, 태그, 적용된 필터 같은 값을 나타냅니다. 기본 상태에서는 칩 색조와 윤곽선 하나로 표시됩니다. chip-remove는 칩 끝에 붙는 원형 버튼입니다. 버튼 이름에 칩의 값을 포함하세요. 칩 앞에 아이콘을 배치할 때는 아이콘에 icon 클래스를 지정하세요.
값
<span class="chip"> ada@example.com<button type="button" class="chip-remove" aria-label="Remove ada@example.com"> <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> <path d="M4 4L12 12" /><path d="M4 12L12 4" /> </svg> </button></span><span class="chip"> alan@example.com<button type="button" class="chip-remove" aria-label="Remove alan@example.com"> <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> <path d="M4 4L12 12" /><path d="M4 12L12 4" /> </svg> </button></span><span class="chip"> <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> <path d="M4.5365 3L11.4635 3A1 1 0 0 1 12.2548 4.6114L9.4587 8.2299A1 1 0 0 0 9.25 8.8413L9.25 11.323A1 1 0 0 1 8.6214 12.2514L7.875 12.55A0.8203 0.8203 0 0 1 6.75 11.7883L6.75 8.8413A1 1 0 0 0 6.5413 8.2299L3.7452 4.6114A1 1 0 0 1 4.5365 3Z" /> </svg> Status: Ready</span>import XIcon from '@master/icons-react/native/16/soft/x'import FilterIcon from '@master/icons-react/native/16/soft/filter'<> <span className="chip"> ada@example.com<button type="button" className="chip-remove" aria-label="Remove ada@example.com"> <XIcon className="icon" /> </button> </span> <span className="chip"> alan@example.com<button type="button" className="chip-remove" aria-label="Remove alan@example.com"> <XIcon className="icon" /> </button> </span> <span className="chip"><FilterIcon className="icon" /> Status: Ready</span></><script> import XIcon from '@master/icons-svelte/native/16/soft/x' import FilterIcon from '@master/icons-svelte/native/16/soft/filter'</script><span class="chip"> ada@example.com<button type="button" class="chip-remove" aria-label="Remove ada@example.com"> <XIcon class="icon" /> </button></span><span class="chip"> alan@example.com<button type="button" class="chip-remove" aria-label="Remove alan@example.com"> <XIcon class="icon" /> </button></span><span class="chip"><FilterIcon class="icon" /> Status: Ready</span><script setup>import XIcon from '@master/icons-vue/native/16/soft/x'import FilterIcon from '@master/icons-vue/native/16/soft/filter'</script><template> <span class="chip"> ada@example.com<button type="button" class="chip-remove" aria-label="Remove ada@example.com"> <XIcon class="icon" /> </button> </span> <span class="chip"> alan@example.com<button type="button" class="chip-remove" aria-label="Remove alan@example.com"> <XIcon class="icon" /> </button> </span> <span class="chip"><FilterIcon class="icon" /> Status: Ready</span></template>#그림, 점, 개수
칩에는 순서대로 그림(chip-media, 칩이 크기와 둥근 모양을 맞추는 아바타나 아이콘), 카테고리 점(chip-dot), 텍스트(chip-label), 개수(chip-count를 지정한 배지), 삭제 버튼(아이콘을 담는 chip-remove)을 넣을 수 있습니다. 공간이 부족하면 텍스트가 먼저 줄어들어 말줄임표로 끝나며, 그림과 개수와 버튼은 크기를 유지합니다. 시작 부분의 그림과 끝 부분의 개수는 칩의 끝에서 위아래 가장자리와 같은 거리만큼 떨어져 있으므로 곡선이 동심원을 이룹니다.
그림, 점, 개수
<span class="chip"> <span class="chip-media"> <span class="avatar"><img class="avatar-image" src="/demo/portrait-1.svg" alt></span> </span><span class="chip-label">Ada Lovelace</span><button type="button" class="chip-remove" aria-label="Remove Ada Lovelace"> <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> <path d="M4 4L12 12" /><path d="M4 12L12 4" /> </svg> </button></span><span class="chip"> <span class="chip-media"><span class="avatar" aria-hidden="true">GH</span></span><span class="chip-label">Grace Hopper</span><button type="button" class="chip-remove" aria-label="Remove Grace Hopper"> <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> <path d="M4 4L12 12" /><path d="M4 12L12 4" /> </svg> </button></span><span class="chip max-w(176)" title="Accessibility review for the checkout"> <span class="chip-dot"></span><span class="chip-label">Accessibility review for the checkout</span><span class="badge chip-count">12</span></span>import XIcon from '@master/icons-react/native/16/soft/x'<> <span className="chip"> <span className="chip-media"> <span className="avatar"> <img className="avatar-image" src="/demo/portrait-1.svg" alt="" /> </span> </span><span className="chip-label">Ada Lovelace</span><button type="button" className="chip-remove" aria-label="Remove Ada Lovelace"> <XIcon className="icon" /> </button> </span> <span className="chip"> <span className="chip-media"><span className="avatar" aria-hidden="true">GH</span></span><span className="chip-label">Grace Hopper</span><button type="button" className="chip-remove" aria-label="Remove Grace Hopper"> <XIcon className="icon" /> </button> </span> <span className="chip max-w(176)" title="Accessibility review for the checkout"> <span className="chip-dot"></span><span className="chip-label">Accessibility review for the checkout</span><span className="badge chip-count">12</span> </span></><script> import XIcon from '@master/icons-svelte/native/16/soft/x'</script><span class="chip"> <span class="chip-media"> <span class="avatar"><img class="avatar-image" src="/demo/portrait-1.svg" alt></span> </span><span class="chip-label">Ada Lovelace</span><button type="button" class="chip-remove" aria-label="Remove Ada Lovelace"> <XIcon class="icon" /> </button></span><span class="chip"> <span class="chip-media"><span class="avatar" aria-hidden="true">GH</span></span><span class="chip-label">Grace Hopper</span><button type="button" class="chip-remove" aria-label="Remove Grace Hopper"> <XIcon class="icon" /> </button></span><span class="chip max-w(176)" title="Accessibility review for the checkout"> <span class="chip-dot"></span><span class="chip-label">Accessibility review for the checkout</span><span class="badge chip-count">12</span></span><script setup>import XIcon from '@master/icons-vue/native/16/soft/x'</script><template> <span class="chip"> <span class="chip-media"> <span class="avatar"><img class="avatar-image" src="/demo/portrait-1.svg" alt></span> </span><span class="chip-label">Ada Lovelace</span><button type="button" class="chip-remove" aria-label="Remove Ada Lovelace"> <XIcon class="icon" /> </button> </span> <span class="chip"> <span class="chip-media"><span class="avatar" aria-hidden="true">GH</span></span><span class="chip-label">Grace Hopper</span><button type="button" class="chip-remove" aria-label="Remove Grace Hopper"> <XIcon class="icon" /> </button> </span> <span class="chip max-w(176)" title="Accessibility review for the checkout"> <span class="chip-dot"></span><span class="chip-label">Accessibility review for the checkout</span><span class="badge chip-count">12</span> </span></template>개수는 배지이므로 배지의 재질을 유지합니다. 단, 선택한 필터에서는 잉크 색의 톤을 사용합니다.
필터의 개수
<div class="flex flex-wrap gap-xs" role="group" aria-label="Status"> <label class="chip"> <input type="checkbox" class="chip-input" checked>Open <span class="badge chip-count">24</span> </label> <label class="chip"> <input type="checkbox" class="chip-input">In review <span class="badge chip-count">7</span> </label> <label class="chip"> <input type="checkbox" class="chip-input">Closed <span class="badge chip-count">132</span> </label></div><div className="flex flex-wrap gap-xs" role="group" aria-label="Status"> <label className="chip"> <input type="checkbox" className="chip-input" defaultChecked />Open <span className="badge chip-count">24</span> </label> <label className="chip"> <input type="checkbox" className="chip-input" />In review <span className="badge chip-count">7</span> </label> <label className="chip"> <input type="checkbox" className="chip-input" />Closed <span className="badge chip-count">132</span> </label></div><div class="flex flex-wrap gap-xs" role="group" aria-label="Status"> <label class="chip"> <input type="checkbox" class="chip-input" checked>Open <span class="badge chip-count">24</span> </label> <label class="chip"> <input type="checkbox" class="chip-input">In review <span class="badge chip-count">7</span> </label> <label class="chip"> <input type="checkbox" class="chip-input">Closed <span class="badge chip-count">132</span> </label></div><template> <div class="flex flex-wrap gap-xs" role="group" aria-label="Status"> <label class="chip"> <input type="checkbox" class="chip-input" checked>Open <span class="badge chip-count">24</span> </label> <label class="chip"> <input type="checkbox" class="chip-input">In review <span class="badge chip-count">7</span> </label> <label class="chip"> <input type="checkbox" class="chip-input">Closed <span class="badge chip-count">132</span> </label> </div></template>필터 칩은 입력 요소를 감싼 레이블이므로 칩 전체가 조작 대상입니다. 필터 칩에는 삭제 버튼을 넣지 마세요. 삭제할 수 있는 값은 chip-remove가 있는 일반 칩으로 작성합니다.
#카테고리 색상
chip-category는 칩 자체나 그 상위 요소에 지정된 카테고리 색상을 읽습니다. 값 칩에는 카테고리의 표면색, 텍스트 색, 선 색이 적용됩니다. 필터 칩은 살짝 올라온 표면과 선택 시의 잉크 색을 유지하므로 어느 카테고리에서든 선택 상태가 같은 방식으로 표시되며, 카테고리는 chip-dot으로 나타냅니다.
카테고리 색상
<div class="flex flex-col items-center gap-sm"> <div class="flex flex-wrap justify-center gap-xs"> <span class="chip chip-category category-violet"> <span class="chip-dot"></span>Research<button type="button" class="chip-remove" aria-label="Remove Research"> <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> <path d="M4 4L12 12" /><path d="M4 12L12 4" /> </svg> </button> </span> <span class="chip chip-category category-teal"> <span class="chip-dot"></span>Design system<button type="button" class="chip-remove" aria-label="Remove Design system"> <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> <path d="M4 4L12 12" /><path d="M4 12L12 4" /> </svg> </button> </span> </div> <div class="flex flex-wrap justify-center gap-xs" role="group" aria-label="Projects"> <label class="chip chip-category category-violet"> <input type="checkbox" class="chip-input" checked><span class="chip-dot"></span>Research </label> <label class="chip chip-category category-teal"> <input type="checkbox" class="chip-input"><span class="chip-dot"></span>Design system </label> <label class="chip chip-category category-orange"> <input type="checkbox" class="chip-input"><span class="chip-dot"></span>Launch </label> </div></div>import XIcon from '@master/icons-react/native/16/soft/x'<div className="flex flex-col items-center gap-sm"> <div className="flex flex-wrap justify-center gap-xs"> <span className="chip chip-category category-violet"> <span className="chip-dot"></span>Research<button type="button" className="chip-remove" aria-label="Remove Research"> <XIcon className="icon" /> </button> </span> <span className="chip chip-category category-teal"> <span className="chip-dot"></span>Design system<button type="button" className="chip-remove" aria-label="Remove Design system"> <XIcon className="icon" /> </button> </span> </div> <div className="flex flex-wrap justify-center gap-xs" role="group" aria-label="Projects"> <label className="chip chip-category category-violet"> <input type="checkbox" className="chip-input" defaultChecked /><span className="chip-dot"></span>Research </label> <label className="chip chip-category category-teal"> <input type="checkbox" className="chip-input" /><span className="chip-dot"></span>Design system </label> <label className="chip chip-category category-orange"> <input type="checkbox" className="chip-input" /><span className="chip-dot"></span>Launch </label> </div></div><script> import XIcon from '@master/icons-svelte/native/16/soft/x'</script><div class="flex flex-col items-center gap-sm"> <div class="flex flex-wrap justify-center gap-xs"> <span class="chip chip-category category-violet"> <span class="chip-dot"></span>Research<button type="button" class="chip-remove" aria-label="Remove Research"> <XIcon class="icon" /> </button> </span> <span class="chip chip-category category-teal"> <span class="chip-dot"></span>Design system<button type="button" class="chip-remove" aria-label="Remove Design system"> <XIcon class="icon" /> </button> </span> </div> <div class="flex flex-wrap justify-center gap-xs" role="group" aria-label="Projects"> <label class="chip chip-category category-violet"> <input type="checkbox" class="chip-input" checked><span class="chip-dot"></span>Research </label> <label class="chip chip-category category-teal"> <input type="checkbox" class="chip-input"><span class="chip-dot"></span>Design system </label> <label class="chip chip-category category-orange"> <input type="checkbox" class="chip-input"><span class="chip-dot"></span>Launch </label> </div></div><script setup>import XIcon from '@master/icons-vue/native/16/soft/x'</script><template> <div class="flex flex-col items-center gap-sm"> <div class="flex flex-wrap justify-center gap-xs"> <span class="chip chip-category category-violet"> <span class="chip-dot"></span>Research<button type="button" class="chip-remove" aria-label="Remove Research"> <XIcon class="icon" /> </button> </span> <span class="chip chip-category category-teal"> <span class="chip-dot"></span>Design system<button type="button" class="chip-remove" aria-label="Remove Design system"> <XIcon class="icon" /> </button> </span> </div> <div class="flex flex-wrap justify-center gap-xs" role="group" aria-label="Projects"> <label class="chip chip-category category-violet"> <input type="checkbox" class="chip-input" checked><span class="chip-dot"></span>Research </label> <label class="chip chip-category category-teal"> <input type="checkbox" class="chip-input"><span class="chip-dot"></span>Design system </label> <label class="chip chip-category category-orange"> <input type="checkbox" class="chip-input"><span class="chip-dot"></span>Launch </label> </div> </div></template>#크기
chip-sm은 24px, chip-lg는 32px이며 기본값은 28px입니다. 삭제 버튼, 그림, 개수도 함께 크기가 바뀝니다. 터치 화면에서도 칩은 높이를 유지합니다. 필터 칩의 조작 영역은 칩 바깥까지 확장되어 44px에 이르고, 삭제 버튼의 조작 영역은 해당 값 칩 안에서 높이 44px에 이릅니다. 태그 입력처럼 값을 담는 필드는 칩 높이를 직접 설정합니다.
크기
<span class="chip chip-sm"> <span class="chip-dot"></span>Small<button type="button" class="chip-remove" aria-label="Remove Small"> <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> <path d="M4 4L12 12" /><path d="M4 12L12 4" /> </svg> </button></span><span class="chip"> <span class="chip-dot"></span>Medium<button type="button" class="chip-remove" aria-label="Remove Medium"> <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> <path d="M4 4L12 12" /><path d="M4 12L12 4" /> </svg> </button></span><span class="chip chip-lg"> <span class="chip-dot"></span>Large<button type="button" class="chip-remove" aria-label="Remove Large"> <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> <path d="M4 4L12 12" /><path d="M4 12L12 4" /> </svg> </button></span>import XIcon from '@master/icons-react/native/16/soft/x'<> <span className="chip chip-sm"> <span className="chip-dot"></span>Small<button type="button" className="chip-remove" aria-label="Remove Small"> <XIcon className="icon" /> </button> </span> <span className="chip"> <span className="chip-dot"></span>Medium<button type="button" className="chip-remove" aria-label="Remove Medium"> <XIcon className="icon" /> </button> </span> <span className="chip chip-lg"> <span className="chip-dot"></span>Large<button type="button" className="chip-remove" aria-label="Remove Large"> <XIcon className="icon" /> </button> </span></><script> import XIcon from '@master/icons-svelte/native/16/soft/x'</script><span class="chip chip-sm"> <span class="chip-dot"></span>Small<button type="button" class="chip-remove" aria-label="Remove Small"> <XIcon class="icon" /> </button></span><span class="chip"> <span class="chip-dot"></span>Medium<button type="button" class="chip-remove" aria-label="Remove Medium"> <XIcon class="icon" /> </button></span><span class="chip chip-lg"> <span class="chip-dot"></span>Large<button type="button" class="chip-remove" aria-label="Remove Large"> <XIcon class="icon" /> </button></span><script setup>import XIcon from '@master/icons-vue/native/16/soft/x'</script><template> <span class="chip chip-sm"> <span class="chip-dot"></span>Small<button type="button" class="chip-remove" aria-label="Remove Small"> <XIcon class="icon" /> </button> </span> <span class="chip"> <span class="chip-dot"></span>Medium<button type="button" class="chip-remove" aria-label="Remove Medium"> <XIcon class="icon" /> </button> </span> <span class="chip chip-lg"> <span class="chip-dot"></span>Large<button type="button" class="chip-remove" aria-label="Remove Large"> <XIcon class="icon" /> </button> </span></template>#접근성
- 필터 칩 안의 입력 요소가 보이지 않는 상태로 칩 전체를 덮습니다. 레이블 전체가 조작 영역이 되고, 입력 요소는 상태와 키보드 동작, 폼 값을 관리합니다. 필터 칩은
<legend>요소가 있는<fieldset>으로 묶거나,role="radiogroup"과 레이블을 지정한 요소로 묶으세요. - 삭제 버튼은 아이콘의 위치를 그대로 유지하면서 조작 영역을 28px로 넓힙니다. 터치 화면에서는 이 조작 영역의 높이가 44px가 되며, 해당 값 칩의 끝을 넘어가지 않습니다.
- 카테고리 점은 장식 요소입니다. 카테고리는 칩의 텍스트로 전달합니다.
- 선택한 칩은 moonstone에서 잉크 색으로, obsidian에서 진주색으로 표시됩니다. 두 색 모두 무채색이므로 색상을 구별하지 않아도 선택 상태를 알아볼 수 있습니다.
#클래스
| 클래스 | 설명 |
|---|---|
chip | 높이 28px의 알약 모양입니다. chip-input을 감싼 레이블이거나 값을 담은 일반 요소입니다. 터치 화면에서는 알약 모양은 높이를 유지하고, 필터 칩과 삭제 버튼의 조작 영역만 높이 44px까지 넓어집니다. |
chip-sm | 높이 24px입니다. 기본값은 28px입니다.적용할 클래스는 chip입니다 |
chip-lg | 높이 32px입니다. 기본값은 28px입니다.적용할 클래스는 chip입니다 |
chip-category | 값 칩은 칩 자체나 그 상위 요소에 지정한 category-<name> 클래스의 카테고리에서 표면색, 텍스트 색, 선 색을 가져옵니다. 필터 칩은 표면을 유지하고 chip-dot으로 카테고리를 표시합니다.적용할 클래스는 chip입니다 |
chip-input | 필터 칩 안의 체크박스 또는 라디오 버튼입니다. 입력 요소가 칩 전체를 보이지 않게 덮으며, 레이블이 조작 대상이 되고 입력 요소가 상태를 유지합니다. |
chip-remove | 값 끝에 있는 원형 제거 버튼으로, 아이콘을 담습니다. 접근 가능한 이름에 해당 값을 포함합니다 |
chip-label | 텍스트입니다. 공간이 부족하면 가장 먼저 줄어들어 말줄임표로 끝나므로, 그림, 개수, 삭제 버튼은 크기를 유지합니다. |
chip-media | 시작 부분의 원형 그림으로, 크기는 칩 높이에서 안쪽 여백 두 개를 뺀 값입니다. 아바타나 아이콘을 담고 그 크기를 맞춥니다. |
chip-dot | 카테고리의 표시색으로 칠한 8px 점이며, 카테고리가 없으면 흐린 잉크 색입니다. 장식 요소이므로 카테고리 이름은 레이블로 전달합니다. |
chip-count | 칩 안의 배지에 지정합니다. 배지를 칩과 동심원을 이루는 알약 모양으로 맞추고, 선택한 필터에서는 잉크 색 톤을 적용합니다. |
#사용자 지정 속성
| 속성 | 기본값 | 설명 |
|---|---|---|
--chip-height | 1.75rem | 높이. 값을 담는 필드는 오목한 영역 안의 칩 높이를 직접 설정합니다 |
--chip-inset | .25rem | chip-media나 chip-count가 칩 끝에서 안쪽으로 떨어진 거리 |