탐색

v2.1.0
구조

칸반

여러 열로 이루어진 보드입니다. 드래그하거나 키보드를 쓰거나 자리를 골라 항목을 열 안에서 또는 다른 열로 옮깁니다.

이 페이지의 내용

칸반은 여러 열로 이루어진 보드입니다. 각 열은 목록을 담은, 이름이 있는 섹션이며, 항목을 같은 열의 다른 자리나 다른 열로 옮길 수 있습니다. 각 항목에는 작은 컨트롤이 두 개 있습니다. 하나는 포인터나 키보드로 항목을 옮기는 핸들이고, 다른 하나는 드래그 없이 열과 위치를 고르는 이동 폼을 여는 버튼입니다. 항목에 무엇을 표시할지는 페이지가 정합니다. 여기서는 배지와 아바타가 있는 카드입니다. 이동은 kanban 동작이 처리하며, 이동을 확정하기 전에는 아무것도 움직이지 않습니다.

칸반

<div class="kanban h(376)" role="group" aria-label="Launch plan">  <section class="kanban-column" data-value="backlog" aria-labelledby="launch-backlog">    <header class="kanban-header">      <h3 class="kanban-title" id="launch-backlog">Backlog</h3>    </header>    <ol class="kanban-items">      <li class="kanban-item" data-value="emails">        <article class="card gap-xs">          <div class="card-header">            <p class="card-title">Audit the onboarding emails</p>            <span class="card-action kanban-controls">              <button type="button" class="kanban-move" popovertarget="launch-mover" aria-label="Move Audit the onboarding emails">                <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.2559 2.3817A0.4996 0.4996 0 0 0 4.1667 2.6667L4.1673 13.3578A0.5 0.5 0 0 0 5.1613 13.4067L5.1667 13.3333L5.1653 2.6288A0.5007 0.5007 0 0 0 5.0775 2.3817A0.7044 0.7044 0 0 0 4.2559 2.3817Z" fill="currentColor" stroke="none" fill-rule="evenodd" transform="rotate(90 8 8)" /><path d="M2.3333 5L4.5253 2.8081A0.2 0.2 0 0 1 4.8081 2.8081L7 5" transform="rotate(90 8 8)" /><path d="M11.8333 13.3333L11.8327 2.6422A0.5 0.5 0 0 0 10.8387 2.5933L10.8333 2.6667L10.8347 13.3712A0.5007 0.5007 0 0 0 10.9225 13.6183A0.7044 0.7044 0 0 0 11.7441 13.6183A0.4996 0.4996 0 0 0 11.8333 13.3333Z" fill="currentColor" stroke="none" fill-rule="evenodd" transform="rotate(90 8 8)" /><path d="M9 11L11.1919 13.1919A0.2 0.2 0 0 0 11.4747 13.1919L13.6667 11" transform="rotate(90 8 8)" />                </svg>              </button>              <button type="button" class="kanban-handle" aria-pressed="false" aria-label="Drag Audit the onboarding emails">                <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">                  <circle cx="6" cy="4" r="1" fill="currentColor" stroke="none" /><circle cx="10" cy="4" r="1" fill="currentColor" stroke="none" /><circle cx="6" cy="8" r="1" fill="currentColor" stroke="none" /><circle cx="10" cy="8" r="1" fill="currentColor" stroke="none" /><circle cx="6" cy="12" r="1" fill="currentColor" stroke="none" /><circle cx="10" cy="12" r="1" fill="currentColor" stroke="none" />                </svg>              </button>            </span>          </div>          <div class="flex items-center justify-between gap-xs">            <span class="badge badge-sm">Lifecycle</span>            <span class="avatar avatar-xs" role="img" aria-label="Yi-ching Lin">YL</span>          </div>        </article>      </li>      <li class="kanban-item" data-value="pricing">        <article class="card gap-xs">          <div class="card-header">            <p class="card-title">Price the annual plan</p>            <span class="card-action kanban-controls">              <button type="button" class="kanban-move" popovertarget="launch-mover" aria-label="Move Price the annual plan">                <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.2559 2.3817A0.4996 0.4996 0 0 0 4.1667 2.6667L4.1673 13.3578A0.5 0.5 0 0 0 5.1613 13.4067L5.1667 13.3333L5.1653 2.6288A0.5007 0.5007 0 0 0 5.0775 2.3817A0.7044 0.7044 0 0 0 4.2559 2.3817Z" fill="currentColor" stroke="none" fill-rule="evenodd" transform="rotate(90 8 8)" /><path d="M2.3333 5L4.5253 2.8081A0.2 0.2 0 0 1 4.8081 2.8081L7 5" transform="rotate(90 8 8)" /><path d="M11.8333 13.3333L11.8327 2.6422A0.5 0.5 0 0 0 10.8387 2.5933L10.8333 2.6667L10.8347 13.3712A0.5007 0.5007 0 0 0 10.9225 13.6183A0.7044 0.7044 0 0 0 11.7441 13.6183A0.4996 0.4996 0 0 0 11.8333 13.3333Z" fill="currentColor" stroke="none" fill-rule="evenodd" transform="rotate(90 8 8)" /><path d="M9 11L11.1919 13.1919A0.2 0.2 0 0 0 11.4747 13.1919L13.6667 11" transform="rotate(90 8 8)" />                </svg>              </button>              <button type="button" class="kanban-handle" aria-pressed="false" aria-label="Drag Price the annual plan">                <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">                  <circle cx="6" cy="4" r="1" fill="currentColor" stroke="none" /><circle cx="10" cy="4" r="1" fill="currentColor" stroke="none" /><circle cx="6" cy="8" r="1" fill="currentColor" stroke="none" /><circle cx="10" cy="8" r="1" fill="currentColor" stroke="none" /><circle cx="6" cy="12" r="1" fill="currentColor" stroke="none" /><circle cx="10" cy="12" r="1" fill="currentColor" stroke="none" />                </svg>              </button>            </span>          </div>          <div class="flex items-center justify-between gap-xs">            <span class="badge badge-sm">Pricing</span>            <span class="avatar avatar-xs" role="img" aria-label="Po-han Chen">PC</span>          </div>        </article>      </li>      <li class="kanban-item" data-value="tour">        <article class="card gap-xs">          <div class="card-header">            <p class="card-title">Record the product tour</p>            <span class="card-action kanban-controls">              <button type="button" class="kanban-move" popovertarget="launch-mover" aria-label="Move Record the product tour">                <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.2559 2.3817A0.4996 0.4996 0 0 0 4.1667 2.6667L4.1673 13.3578A0.5 0.5 0 0 0 5.1613 13.4067L5.1667 13.3333L5.1653 2.6288A0.5007 0.5007 0 0 0 5.0775 2.3817A0.7044 0.7044 0 0 0 4.2559 2.3817Z" fill="currentColor" stroke="none" fill-rule="evenodd" transform="rotate(90 8 8)" /><path d="M2.3333 5L4.5253 2.8081A0.2 0.2 0 0 1 4.8081 2.8081L7 5" transform="rotate(90 8 8)" /><path d="M11.8333 13.3333L11.8327 2.6422A0.5 0.5 0 0 0 10.8387 2.5933L10.8333 2.6667L10.8347 13.3712A0.5007 0.5007 0 0 0 10.9225 13.6183A0.7044 0.7044 0 0 0 11.7441 13.6183A0.4996 0.4996 0 0 0 11.8333 13.3333Z" fill="currentColor" stroke="none" fill-rule="evenodd" transform="rotate(90 8 8)" /><path d="M9 11L11.1919 13.1919A0.2 0.2 0 0 0 11.4747 13.1919L13.6667 11" transform="rotate(90 8 8)" />                </svg>              </button>              <button type="button" class="kanban-handle" aria-pressed="false" aria-label="Drag Record the product tour">                <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">                  <circle cx="6" cy="4" r="1" fill="currentColor" stroke="none" /><circle cx="10" cy="4" r="1" fill="currentColor" stroke="none" /><circle cx="6" cy="8" r="1" fill="currentColor" stroke="none" /><circle cx="10" cy="8" r="1" fill="currentColor" stroke="none" /><circle cx="6" cy="12" r="1" fill="currentColor" stroke="none" /><circle cx="10" cy="12" r="1" fill="currentColor" stroke="none" />                </svg>              </button>            </span>          </div>          <div class="flex items-center justify-between gap-xs">            <span class="badge badge-sm">Video</span>            <span class="avatar avatar-xs" role="img" aria-label="Mei Kato">MK</span>          </div>        </article>      </li>      <li class="kanban-item" data-value="translate">        <article class="card gap-xs">          <div class="card-header">            <p class="card-title">Translate the pricing page</p>            <span class="card-action kanban-controls">              <button type="button" class="kanban-move" popovertarget="launch-mover" aria-label="Move Translate the pricing page">                <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.2559 2.3817A0.4996 0.4996 0 0 0 4.1667 2.6667L4.1673 13.3578A0.5 0.5 0 0 0 5.1613 13.4067L5.1667 13.3333L5.1653 2.6288A0.5007 0.5007 0 0 0 5.0775 2.3817A0.7044 0.7044 0 0 0 4.2559 2.3817Z" fill="currentColor" stroke="none" fill-rule="evenodd" transform="rotate(90 8 8)" /><path d="M2.3333 5L4.5253 2.8081A0.2 0.2 0 0 1 4.8081 2.8081L7 5" transform="rotate(90 8 8)" /><path d="M11.8333 13.3333L11.8327 2.6422A0.5 0.5 0 0 0 10.8387 2.5933L10.8333 2.6667L10.8347 13.3712A0.5007 0.5007 0 0 0 10.9225 13.6183A0.7044 0.7044 0 0 0 11.7441 13.6183A0.4996 0.4996 0 0 0 11.8333 13.3333Z" fill="currentColor" stroke="none" fill-rule="evenodd" transform="rotate(90 8 8)" /><path d="M9 11L11.1919 13.1919A0.2 0.2 0 0 0 11.4747 13.1919L13.6667 11" transform="rotate(90 8 8)" />                </svg>              </button>              <button type="button" class="kanban-handle" aria-pressed="false" aria-label="Drag Translate the pricing page">                <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">                  <circle cx="6" cy="4" r="1" fill="currentColor" stroke="none" /><circle cx="10" cy="4" r="1" fill="currentColor" stroke="none" /><circle cx="6" cy="8" r="1" fill="currentColor" stroke="none" /><circle cx="10" cy="8" r="1" fill="currentColor" stroke="none" /><circle cx="6" cy="12" r="1" fill="currentColor" stroke="none" /><circle cx="10" cy="12" r="1" fill="currentColor" stroke="none" />                </svg>              </button>            </span>          </div>          <div class="flex items-center justify-between gap-xs">            <span class="badge badge-sm">Localization</span>            <span class="avatar avatar-xs" role="img" aria-label="Ana Souza">AS</span>          </div>        </article>      </li>    </ol>    <p class="kanban-empty">Nothing waiting</p>  </section>  <section class="kanban-column" data-value="progress" aria-labelledby="launch-progress">    <header class="kanban-header">      <h3 class="kanban-title" id="launch-progress">In progress</h3>    </header>    <ol class="kanban-items">      <li class="kanban-item" data-value="post">        <article class="card gap-xs">          <div class="card-header">            <p class="card-title">Draft the launch post</p>            <span class="card-action kanban-controls">              <button type="button" class="kanban-move" popovertarget="launch-mover" aria-label="Move Draft the launch post">                <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.2559 2.3817A0.4996 0.4996 0 0 0 4.1667 2.6667L4.1673 13.3578A0.5 0.5 0 0 0 5.1613 13.4067L5.1667 13.3333L5.1653 2.6288A0.5007 0.5007 0 0 0 5.0775 2.3817A0.7044 0.7044 0 0 0 4.2559 2.3817Z" fill="currentColor" stroke="none" fill-rule="evenodd" transform="rotate(90 8 8)" /><path d="M2.3333 5L4.5253 2.8081A0.2 0.2 0 0 1 4.8081 2.8081L7 5" transform="rotate(90 8 8)" /><path d="M11.8333 13.3333L11.8327 2.6422A0.5 0.5 0 0 0 10.8387 2.5933L10.8333 2.6667L10.8347 13.3712A0.5007 0.5007 0 0 0 10.9225 13.6183A0.7044 0.7044 0 0 0 11.7441 13.6183A0.4996 0.4996 0 0 0 11.8333 13.3333Z" fill="currentColor" stroke="none" fill-rule="evenodd" transform="rotate(90 8 8)" /><path d="M9 11L11.1919 13.1919A0.2 0.2 0 0 0 11.4747 13.1919L13.6667 11" transform="rotate(90 8 8)" />                </svg>              </button>              <button type="button" class="kanban-handle" aria-pressed="false" aria-label="Drag Draft the launch post">                <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">                  <circle cx="6" cy="4" r="1" fill="currentColor" stroke="none" /><circle cx="10" cy="4" r="1" fill="currentColor" stroke="none" /><circle cx="6" cy="8" r="1" fill="currentColor" stroke="none" /><circle cx="10" cy="8" r="1" fill="currentColor" stroke="none" /><circle cx="6" cy="12" r="1" fill="currentColor" stroke="none" /><circle cx="10" cy="12" r="1" fill="currentColor" stroke="none" />                </svg>              </button>            </span>          </div>          <div class="flex items-center justify-between gap-xs">            <span class="badge badge-sm">Writing</span>            <span class="avatar avatar-xs" role="img" aria-label="Mei Kato">MK</span>          </div>        </article>      </li>      <li class="kanban-item" data-value="table">        <article class="card gap-xs">          <div class="card-header">            <p class="card-title">Design the comparison table</p>            <span class="card-action kanban-controls">              <button type="button" class="kanban-move" popovertarget="launch-mover" aria-label="Move Design the comparison table">                <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.2559 2.3817A0.4996 0.4996 0 0 0 4.1667 2.6667L4.1673 13.3578A0.5 0.5 0 0 0 5.1613 13.4067L5.1667 13.3333L5.1653 2.6288A0.5007 0.5007 0 0 0 5.0775 2.3817A0.7044 0.7044 0 0 0 4.2559 2.3817Z" fill="currentColor" stroke="none" fill-rule="evenodd" transform="rotate(90 8 8)" /><path d="M2.3333 5L4.5253 2.8081A0.2 0.2 0 0 1 4.8081 2.8081L7 5" transform="rotate(90 8 8)" /><path d="M11.8333 13.3333L11.8327 2.6422A0.5 0.5 0 0 0 10.8387 2.5933L10.8333 2.6667L10.8347 13.3712A0.5007 0.5007 0 0 0 10.9225 13.6183A0.7044 0.7044 0 0 0 11.7441 13.6183A0.4996 0.4996 0 0 0 11.8333 13.3333Z" fill="currentColor" stroke="none" fill-rule="evenodd" transform="rotate(90 8 8)" /><path d="M9 11L11.1919 13.1919A0.2 0.2 0 0 0 11.4747 13.1919L13.6667 11" transform="rotate(90 8 8)" />                </svg>              </button>              <button type="button" class="kanban-handle" aria-pressed="false" aria-label="Drag Design the comparison table">                <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">                  <circle cx="6" cy="4" r="1" fill="currentColor" stroke="none" /><circle cx="10" cy="4" r="1" fill="currentColor" stroke="none" /><circle cx="6" cy="8" r="1" fill="currentColor" stroke="none" /><circle cx="10" cy="8" r="1" fill="currentColor" stroke="none" /><circle cx="6" cy="12" r="1" fill="currentColor" stroke="none" /><circle cx="10" cy="12" r="1" fill="currentColor" stroke="none" />                </svg>              </button>            </span>          </div>          <div class="flex items-center justify-between gap-xs">            <span class="badge badge-sm">Design</span>            <span class="avatar avatar-xs" role="img" aria-label="Yi-ching Lin">YL</span>          </div>        </article>      </li>    </ol>    <p class="kanban-empty">Nothing in progress</p>  </section>  <section class="kanban-column" data-value="review" aria-labelledby="launch-review">    <header class="kanban-header">      <h3 class="kanban-title" id="launch-review">In review</h3>    </header>    <ol class="kanban-items"></ol>    <p class="kanban-empty">Nothing in review</p>  </section>  <section class="kanban-column" data-value="done" aria-labelledby="launch-done">    <header class="kanban-header">      <h3 class="kanban-title" id="launch-done">Done</h3>    </header>    <ol class="kanban-items">      <li class="kanban-item" data-value="name">        <article class="card gap-xs">          <div class="card-header">            <p class="card-title">Name the release</p>            <span class="card-action kanban-controls">              <button type="button" class="kanban-move" popovertarget="launch-mover" aria-label="Move Name the release">                <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.2559 2.3817A0.4996 0.4996 0 0 0 4.1667 2.6667L4.1673 13.3578A0.5 0.5 0 0 0 5.1613 13.4067L5.1667 13.3333L5.1653 2.6288A0.5007 0.5007 0 0 0 5.0775 2.3817A0.7044 0.7044 0 0 0 4.2559 2.3817Z" fill="currentColor" stroke="none" fill-rule="evenodd" transform="rotate(90 8 8)" /><path d="M2.3333 5L4.5253 2.8081A0.2 0.2 0 0 1 4.8081 2.8081L7 5" transform="rotate(90 8 8)" /><path d="M11.8333 13.3333L11.8327 2.6422A0.5 0.5 0 0 0 10.8387 2.5933L10.8333 2.6667L10.8347 13.3712A0.5007 0.5007 0 0 0 10.9225 13.6183A0.7044 0.7044 0 0 0 11.7441 13.6183A0.4996 0.4996 0 0 0 11.8333 13.3333Z" fill="currentColor" stroke="none" fill-rule="evenodd" transform="rotate(90 8 8)" /><path d="M9 11L11.1919 13.1919A0.2 0.2 0 0 0 11.4747 13.1919L13.6667 11" transform="rotate(90 8 8)" />                </svg>              </button>              <button type="button" class="kanban-handle" aria-pressed="false" aria-label="Drag Name the release">                <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">                  <circle cx="6" cy="4" r="1" fill="currentColor" stroke="none" /><circle cx="10" cy="4" r="1" fill="currentColor" stroke="none" /><circle cx="6" cy="8" r="1" fill="currentColor" stroke="none" /><circle cx="10" cy="8" r="1" fill="currentColor" stroke="none" /><circle cx="6" cy="12" r="1" fill="currentColor" stroke="none" /><circle cx="10" cy="12" r="1" fill="currentColor" stroke="none" />                </svg>              </button>            </span>          </div>          <div class="flex items-center justify-between gap-xs">            <span class="badge badge-sm">Brand</span>            <span class="avatar avatar-xs" role="img" aria-label="Po-han Chen">PC</span>          </div>        </article>      </li>      <li class="kanban-item" data-value="date">        <article class="card gap-xs">          <div class="card-header">            <p class="card-title">Book the launch date</p>            <span class="card-action kanban-controls">              <button type="button" class="kanban-move" popovertarget="launch-mover" aria-label="Move Book the launch date">                <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.2559 2.3817A0.4996 0.4996 0 0 0 4.1667 2.6667L4.1673 13.3578A0.5 0.5 0 0 0 5.1613 13.4067L5.1667 13.3333L5.1653 2.6288A0.5007 0.5007 0 0 0 5.0775 2.3817A0.7044 0.7044 0 0 0 4.2559 2.3817Z" fill="currentColor" stroke="none" fill-rule="evenodd" transform="rotate(90 8 8)" /><path d="M2.3333 5L4.5253 2.8081A0.2 0.2 0 0 1 4.8081 2.8081L7 5" transform="rotate(90 8 8)" /><path d="M11.8333 13.3333L11.8327 2.6422A0.5 0.5 0 0 0 10.8387 2.5933L10.8333 2.6667L10.8347 13.3712A0.5007 0.5007 0 0 0 10.9225 13.6183A0.7044 0.7044 0 0 0 11.7441 13.6183A0.4996 0.4996 0 0 0 11.8333 13.3333Z" fill="currentColor" stroke="none" fill-rule="evenodd" transform="rotate(90 8 8)" /><path d="M9 11L11.1919 13.1919A0.2 0.2 0 0 0 11.4747 13.1919L13.6667 11" transform="rotate(90 8 8)" />                </svg>              </button>              <button type="button" class="kanban-handle" aria-pressed="false" aria-label="Drag Book the launch date">                <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">                  <circle cx="6" cy="4" r="1" fill="currentColor" stroke="none" /><circle cx="10" cy="4" r="1" fill="currentColor" stroke="none" /><circle cx="6" cy="8" r="1" fill="currentColor" stroke="none" /><circle cx="10" cy="8" r="1" fill="currentColor" stroke="none" /><circle cx="6" cy="12" r="1" fill="currentColor" stroke="none" /><circle cx="10" cy="12" r="1" fill="currentColor" stroke="none" />                </svg>              </button>            </span>          </div>          <div class="flex items-center justify-between gap-xs">            <span class="badge badge-sm">Planning</span>            <span class="avatar avatar-xs" role="img" aria-label="Ana Souza">AS</span>          </div>        </article>      </li>    </ol>    <p class="kanban-empty">Nothing done yet</p>  </section>  <div class="popover popover-end" popover id="launch-mover">    <form class="kanban-mover">      <label class="field">Column<select class="select" name="column"></select></label>      <label class="field">Position<select class="select" name="position"></select></label>      <div class="kanban-mover-actions">        <button type="button" class="btn btn-sm" popovertarget="launch-mover" popovertargetaction="hide">          Cancel        </button>        <button type="submit" class="btn btn-sm btn-primary">Move</button>      </div>    </form>  </div>  <div class="kanban-preview" popover="manual" aria-hidden="true"></div>  <p class="kanban-status" role="status"></p></div><script type="module">  import { attach } from '@master/ui/behaviors'  attach()</script>
import { useEffect, useRef } from 'react'import { attach } from '@master/ui/behaviors'import ArrowLeftRightIcon from '@master/icons-react/native/16/soft/arrow-left-right'import GripVerticalIcon from '@master/icons-react/native/16/soft/grip-vertical'export function Example() {  const root = useRef<HTMLDivElement>(null)  useEffect(() => attach(root.current!), [])  return (    <div ref={root} className="kanban h(376)" role="group" aria-label="Launch plan">      <section className="kanban-column" data-value="backlog" aria-labelledby="launch-backlog">        <header className="kanban-header">          <h3 className="kanban-title" id="launch-backlog">Backlog</h3>        </header>        <ol className="kanban-items">          <li className="kanban-item" data-value="emails">            <article className="card gap-xs">              <div className="card-header">                <p className="card-title">Audit the onboarding emails</p>                <span className="card-action kanban-controls">                  <button type="button" className="kanban-move" popoverTarget="launch-mover" aria-label="Move Audit the onboarding emails">                    <ArrowLeftRightIcon className="icon" />                  </button>                  <button type="button" className="kanban-handle" aria-pressed="false" aria-label="Drag Audit the onboarding emails">                    <GripVerticalIcon className="icon" />                  </button>                </span>              </div>              <div className="flex items-center justify-between gap-xs">                <span className="badge badge-sm">Lifecycle</span>                <span className="avatar avatar-xs" role="img" aria-label="Yi-ching Lin">YL</span>              </div>            </article>          </li>          <li className="kanban-item" data-value="pricing">            <article className="card gap-xs">              <div className="card-header">                <p className="card-title">Price the annual plan</p>                <span className="card-action kanban-controls">                  <button type="button" className="kanban-move" popoverTarget="launch-mover" aria-label="Move Price the annual plan">                    <ArrowLeftRightIcon className="icon" />                  </button>                  <button type="button" className="kanban-handle" aria-pressed="false" aria-label="Drag Price the annual plan">                    <GripVerticalIcon className="icon" />                  </button>                </span>              </div>              <div className="flex items-center justify-between gap-xs">                <span className="badge badge-sm">Pricing</span>                <span className="avatar avatar-xs" role="img" aria-label="Po-han Chen">PC</span>              </div>            </article>          </li>          <li className="kanban-item" data-value="tour">            <article className="card gap-xs">              <div className="card-header">                <p className="card-title">Record the product tour</p>                <span className="card-action kanban-controls">                  <button type="button" className="kanban-move" popoverTarget="launch-mover" aria-label="Move Record the product tour">                    <ArrowLeftRightIcon className="icon" />                  </button>                  <button type="button" className="kanban-handle" aria-pressed="false" aria-label="Drag Record the product tour">                    <GripVerticalIcon className="icon" />                  </button>                </span>              </div>              <div className="flex items-center justify-between gap-xs">                <span className="badge badge-sm">Video</span>                <span className="avatar avatar-xs" role="img" aria-label="Mei Kato">MK</span>              </div>            </article>          </li>          <li className="kanban-item" data-value="translate">            <article className="card gap-xs">              <div className="card-header">                <p className="card-title">Translate the pricing page</p>                <span className="card-action kanban-controls">                  <button type="button" className="kanban-move" popoverTarget="launch-mover" aria-label="Move Translate the pricing page">                    <ArrowLeftRightIcon className="icon" />                  </button>                  <button type="button" className="kanban-handle" aria-pressed="false" aria-label="Drag Translate the pricing page">                    <GripVerticalIcon className="icon" />                  </button>                </span>              </div>              <div className="flex items-center justify-between gap-xs">                <span className="badge badge-sm">Localization</span>                <span className="avatar avatar-xs" role="img" aria-label="Ana Souza">AS</span>              </div>            </article>          </li>        </ol>        <p className="kanban-empty">Nothing waiting</p>      </section>      <section className="kanban-column" data-value="progress" aria-labelledby="launch-progress">        <header className="kanban-header">          <h3 className="kanban-title" id="launch-progress">In progress</h3>        </header>        <ol className="kanban-items">          <li className="kanban-item" data-value="post">            <article className="card gap-xs">              <div className="card-header">                <p className="card-title">Draft the launch post</p>                <span className="card-action kanban-controls">                  <button type="button" className="kanban-move" popoverTarget="launch-mover" aria-label="Move Draft the launch post">                    <ArrowLeftRightIcon className="icon" />                  </button>                  <button type="button" className="kanban-handle" aria-pressed="false" aria-label="Drag Draft the launch post">                    <GripVerticalIcon className="icon" />                  </button>                </span>              </div>              <div className="flex items-center justify-between gap-xs">                <span className="badge badge-sm">Writing</span>                <span className="avatar avatar-xs" role="img" aria-label="Mei Kato">MK</span>              </div>            </article>          </li>          <li className="kanban-item" data-value="table">            <article className="card gap-xs">              <div className="card-header">                <p className="card-title">Design the comparison table</p>                <span className="card-action kanban-controls">                  <button type="button" className="kanban-move" popoverTarget="launch-mover" aria-label="Move Design the comparison table">                    <ArrowLeftRightIcon className="icon" />                  </button>                  <button type="button" className="kanban-handle" aria-pressed="false" aria-label="Drag Design the comparison table">                    <GripVerticalIcon className="icon" />                  </button>                </span>              </div>              <div className="flex items-center justify-between gap-xs">                <span className="badge badge-sm">Design</span>                <span className="avatar avatar-xs" role="img" aria-label="Yi-ching Lin">YL</span>              </div>            </article>          </li>        </ol>        <p className="kanban-empty">Nothing in progress</p>      </section>      <section className="kanban-column" data-value="review" aria-labelledby="launch-review">        <header className="kanban-header">          <h3 className="kanban-title" id="launch-review">In review</h3>        </header>        <ol className="kanban-items"></ol>        <p className="kanban-empty">Nothing in review</p>      </section>      <section className="kanban-column" data-value="done" aria-labelledby="launch-done">        <header className="kanban-header">          <h3 className="kanban-title" id="launch-done">Done</h3>        </header>        <ol className="kanban-items">          <li className="kanban-item" data-value="name">            <article className="card gap-xs">              <div className="card-header">                <p className="card-title">Name the release</p>                <span className="card-action kanban-controls">                  <button type="button" className="kanban-move" popoverTarget="launch-mover" aria-label="Move Name the release">                    <ArrowLeftRightIcon className="icon" />                  </button>                  <button type="button" className="kanban-handle" aria-pressed="false" aria-label="Drag Name the release">                    <GripVerticalIcon className="icon" />                  </button>                </span>              </div>              <div className="flex items-center justify-between gap-xs">                <span className="badge badge-sm">Brand</span>                <span className="avatar avatar-xs" role="img" aria-label="Po-han Chen">PC</span>              </div>            </article>          </li>          <li className="kanban-item" data-value="date">            <article className="card gap-xs">              <div className="card-header">                <p className="card-title">Book the launch date</p>                <span className="card-action kanban-controls">                  <button type="button" className="kanban-move" popoverTarget="launch-mover" aria-label="Move Book the launch date">                    <ArrowLeftRightIcon className="icon" />                  </button>                  <button type="button" className="kanban-handle" aria-pressed="false" aria-label="Drag Book the launch date">                    <GripVerticalIcon className="icon" />                  </button>                </span>              </div>              <div className="flex items-center justify-between gap-xs">                <span className="badge badge-sm">Planning</span>                <span className="avatar avatar-xs" role="img" aria-label="Ana Souza">AS</span>              </div>            </article>          </li>        </ol>        <p className="kanban-empty">Nothing done yet</p>      </section>      <div className="popover popover-end" popover="" id="launch-mover">        <form className="kanban-mover">          <label className="field">Column<select className="select" name="column"></select></label>          <label className="field">Position<select className="select" name="position"></select></label>          <div className="kanban-mover-actions">            <button type="button" className="btn btn-sm" popoverTarget="launch-mover" popoverTargetAction="hide">              Cancel            </button>            <button type="submit" className="btn btn-sm btn-primary">Move</button>          </div>        </form>      </div>      <div className="kanban-preview" popover="manual" aria-hidden="true"></div>      <p className="kanban-status" role="status"></p>    </div>  )}
<script>  import { attach } from '@master/ui/behaviors'  import ArrowLeftRightIcon from '@master/icons-svelte/native/16/soft/arrow-left-right'  import GripVerticalIcon from '@master/icons-svelte/native/16/soft/grip-vertical'</script><div class="kanban h(376)" role="group" aria-label="Launch plan" {@attach attach}>  <section class="kanban-column" data-value="backlog" aria-labelledby="launch-backlog">    <header class="kanban-header">      <h3 class="kanban-title" id="launch-backlog">Backlog</h3>    </header>    <ol class="kanban-items">      <li class="kanban-item" data-value="emails">        <article class="card gap-xs">          <div class="card-header">            <p class="card-title">Audit the onboarding emails</p>            <span class="card-action kanban-controls">              <button type="button" class="kanban-move" popovertarget="launch-mover" aria-label="Move Audit the onboarding emails">                <ArrowLeftRightIcon class="icon" />              </button>              <button type="button" class="kanban-handle" aria-pressed="false" aria-label="Drag Audit the onboarding emails">                <GripVerticalIcon class="icon" />              </button>            </span>          </div>          <div class="flex items-center justify-between gap-xs">            <span class="badge badge-sm">Lifecycle</span>            <span class="avatar avatar-xs" role="img" aria-label="Yi-ching Lin">YL</span>          </div>        </article>      </li>      <li class="kanban-item" data-value="pricing">        <article class="card gap-xs">          <div class="card-header">            <p class="card-title">Price the annual plan</p>            <span class="card-action kanban-controls">              <button type="button" class="kanban-move" popovertarget="launch-mover" aria-label="Move Price the annual plan">                <ArrowLeftRightIcon class="icon" />              </button>              <button type="button" class="kanban-handle" aria-pressed="false" aria-label="Drag Price the annual plan">                <GripVerticalIcon class="icon" />              </button>            </span>          </div>          <div class="flex items-center justify-between gap-xs">            <span class="badge badge-sm">Pricing</span>            <span class="avatar avatar-xs" role="img" aria-label="Po-han Chen">PC</span>          </div>        </article>      </li>      <li class="kanban-item" data-value="tour">        <article class="card gap-xs">          <div class="card-header">            <p class="card-title">Record the product tour</p>            <span class="card-action kanban-controls">              <button type="button" class="kanban-move" popovertarget="launch-mover" aria-label="Move Record the product tour">                <ArrowLeftRightIcon class="icon" />              </button>              <button type="button" class="kanban-handle" aria-pressed="false" aria-label="Drag Record the product tour">                <GripVerticalIcon class="icon" />              </button>            </span>          </div>          <div class="flex items-center justify-between gap-xs">            <span class="badge badge-sm">Video</span>            <span class="avatar avatar-xs" role="img" aria-label="Mei Kato">MK</span>          </div>        </article>      </li>      <li class="kanban-item" data-value="translate">        <article class="card gap-xs">          <div class="card-header">            <p class="card-title">Translate the pricing page</p>            <span class="card-action kanban-controls">              <button type="button" class="kanban-move" popovertarget="launch-mover" aria-label="Move Translate the pricing page">                <ArrowLeftRightIcon class="icon" />              </button>              <button type="button" class="kanban-handle" aria-pressed="false" aria-label="Drag Translate the pricing page">                <GripVerticalIcon class="icon" />              </button>            </span>          </div>          <div class="flex items-center justify-between gap-xs">            <span class="badge badge-sm">Localization</span>            <span class="avatar avatar-xs" role="img" aria-label="Ana Souza">AS</span>          </div>        </article>      </li>    </ol>    <p class="kanban-empty">Nothing waiting</p>  </section>  <section class="kanban-column" data-value="progress" aria-labelledby="launch-progress">    <header class="kanban-header">      <h3 class="kanban-title" id="launch-progress">In progress</h3>    </header>    <ol class="kanban-items">      <li class="kanban-item" data-value="post">        <article class="card gap-xs">          <div class="card-header">            <p class="card-title">Draft the launch post</p>            <span class="card-action kanban-controls">              <button type="button" class="kanban-move" popovertarget="launch-mover" aria-label="Move Draft the launch post">                <ArrowLeftRightIcon class="icon" />              </button>              <button type="button" class="kanban-handle" aria-pressed="false" aria-label="Drag Draft the launch post">                <GripVerticalIcon class="icon" />              </button>            </span>          </div>          <div class="flex items-center justify-between gap-xs">            <span class="badge badge-sm">Writing</span>            <span class="avatar avatar-xs" role="img" aria-label="Mei Kato">MK</span>          </div>        </article>      </li>      <li class="kanban-item" data-value="table">        <article class="card gap-xs">          <div class="card-header">            <p class="card-title">Design the comparison table</p>            <span class="card-action kanban-controls">              <button type="button" class="kanban-move" popovertarget="launch-mover" aria-label="Move Design the comparison table">                <ArrowLeftRightIcon class="icon" />              </button>              <button type="button" class="kanban-handle" aria-pressed="false" aria-label="Drag Design the comparison table">                <GripVerticalIcon class="icon" />              </button>            </span>          </div>          <div class="flex items-center justify-between gap-xs">            <span class="badge badge-sm">Design</span>            <span class="avatar avatar-xs" role="img" aria-label="Yi-ching Lin">YL</span>          </div>        </article>      </li>    </ol>    <p class="kanban-empty">Nothing in progress</p>  </section>  <section class="kanban-column" data-value="review" aria-labelledby="launch-review">    <header class="kanban-header">      <h3 class="kanban-title" id="launch-review">In review</h3>    </header>    <ol class="kanban-items"></ol>    <p class="kanban-empty">Nothing in review</p>  </section>  <section class="kanban-column" data-value="done" aria-labelledby="launch-done">    <header class="kanban-header">      <h3 class="kanban-title" id="launch-done">Done</h3>    </header>    <ol class="kanban-items">      <li class="kanban-item" data-value="name">        <article class="card gap-xs">          <div class="card-header">            <p class="card-title">Name the release</p>            <span class="card-action kanban-controls">              <button type="button" class="kanban-move" popovertarget="launch-mover" aria-label="Move Name the release">                <ArrowLeftRightIcon class="icon" />              </button>              <button type="button" class="kanban-handle" aria-pressed="false" aria-label="Drag Name the release">                <GripVerticalIcon class="icon" />              </button>            </span>          </div>          <div class="flex items-center justify-between gap-xs">            <span class="badge badge-sm">Brand</span>            <span class="avatar avatar-xs" role="img" aria-label="Po-han Chen">PC</span>          </div>        </article>      </li>      <li class="kanban-item" data-value="date">        <article class="card gap-xs">          <div class="card-header">            <p class="card-title">Book the launch date</p>            <span class="card-action kanban-controls">              <button type="button" class="kanban-move" popovertarget="launch-mover" aria-label="Move Book the launch date">                <ArrowLeftRightIcon class="icon" />              </button>              <button type="button" class="kanban-handle" aria-pressed="false" aria-label="Drag Book the launch date">                <GripVerticalIcon class="icon" />              </button>            </span>          </div>          <div class="flex items-center justify-between gap-xs">            <span class="badge badge-sm">Planning</span>            <span class="avatar avatar-xs" role="img" aria-label="Ana Souza">AS</span>          </div>        </article>      </li>    </ol>    <p class="kanban-empty">Nothing done yet</p>  </section>  <div class="popover popover-end" popover id="launch-mover">    <form class="kanban-mover">      <label class="field">Column<select class="select" name="column"></select></label>      <label class="field">Position<select class="select" name="position"></select></label>      <div class="kanban-mover-actions">        <button type="button" class="btn btn-sm" popovertarget="launch-mover" popovertargetaction="hide">          Cancel        </button>        <button type="submit" class="btn btn-sm btn-primary">Move</button>      </div>    </form>  </div>  <div class="kanban-preview" popover="manual" aria-hidden="true"></div>  <p class="kanban-status" role="status"></p></div>
<script setup>import { onMounted, onUnmounted, ref } from 'vue'import { attach } from '@master/ui/behaviors'import ArrowLeftRightIcon from '@master/icons-vue/native/16/soft/arrow-left-right'import GripVerticalIcon from '@master/icons-vue/native/16/soft/grip-vertical'const root = ref(null)let detachonMounted(() => { detach = attach(root.value) })onUnmounted(() => detach?.())</script><template>  <div ref="root" class="kanban h(376)" role="group" aria-label="Launch plan">    <section class="kanban-column" data-value="backlog" aria-labelledby="launch-backlog">      <header class="kanban-header">        <h3 class="kanban-title" id="launch-backlog">Backlog</h3>      </header>      <ol class="kanban-items">        <li class="kanban-item" data-value="emails">          <article class="card gap-xs">            <div class="card-header">              <p class="card-title">Audit the onboarding emails</p>              <span class="card-action kanban-controls">                <button type="button" class="kanban-move" popovertarget="launch-mover" aria-label="Move Audit the onboarding emails">                  <ArrowLeftRightIcon class="icon" />                </button>                <button type="button" class="kanban-handle" aria-pressed="false" aria-label="Drag Audit the onboarding emails">                  <GripVerticalIcon class="icon" />                </button>              </span>            </div>            <div class="flex items-center justify-between gap-xs">              <span class="badge badge-sm">Lifecycle</span>              <span class="avatar avatar-xs" role="img" aria-label="Yi-ching Lin">YL</span>            </div>          </article>        </li>        <li class="kanban-item" data-value="pricing">          <article class="card gap-xs">            <div class="card-header">              <p class="card-title">Price the annual plan</p>              <span class="card-action kanban-controls">                <button type="button" class="kanban-move" popovertarget="launch-mover" aria-label="Move Price the annual plan">                  <ArrowLeftRightIcon class="icon" />                </button>                <button type="button" class="kanban-handle" aria-pressed="false" aria-label="Drag Price the annual plan">                  <GripVerticalIcon class="icon" />                </button>              </span>            </div>            <div class="flex items-center justify-between gap-xs">              <span class="badge badge-sm">Pricing</span>              <span class="avatar avatar-xs" role="img" aria-label="Po-han Chen">PC</span>            </div>          </article>        </li>        <li class="kanban-item" data-value="tour">          <article class="card gap-xs">            <div class="card-header">              <p class="card-title">Record the product tour</p>              <span class="card-action kanban-controls">                <button type="button" class="kanban-move" popovertarget="launch-mover" aria-label="Move Record the product tour">                  <ArrowLeftRightIcon class="icon" />                </button>                <button type="button" class="kanban-handle" aria-pressed="false" aria-label="Drag Record the product tour">                  <GripVerticalIcon class="icon" />                </button>              </span>            </div>            <div class="flex items-center justify-between gap-xs">              <span class="badge badge-sm">Video</span>              <span class="avatar avatar-xs" role="img" aria-label="Mei Kato">MK</span>            </div>          </article>        </li>        <li class="kanban-item" data-value="translate">          <article class="card gap-xs">            <div class="card-header">              <p class="card-title">Translate the pricing page</p>              <span class="card-action kanban-controls">                <button type="button" class="kanban-move" popovertarget="launch-mover" aria-label="Move Translate the pricing page">                  <ArrowLeftRightIcon class="icon" />                </button>                <button type="button" class="kanban-handle" aria-pressed="false" aria-label="Drag Translate the pricing page">                  <GripVerticalIcon class="icon" />                </button>              </span>            </div>            <div class="flex items-center justify-between gap-xs">              <span class="badge badge-sm">Localization</span>              <span class="avatar avatar-xs" role="img" aria-label="Ana Souza">AS</span>            </div>          </article>        </li>      </ol>      <p class="kanban-empty">Nothing waiting</p>    </section>    <section class="kanban-column" data-value="progress" aria-labelledby="launch-progress">      <header class="kanban-header">        <h3 class="kanban-title" id="launch-progress">In progress</h3>      </header>      <ol class="kanban-items">        <li class="kanban-item" data-value="post">          <article class="card gap-xs">            <div class="card-header">              <p class="card-title">Draft the launch post</p>              <span class="card-action kanban-controls">                <button type="button" class="kanban-move" popovertarget="launch-mover" aria-label="Move Draft the launch post">                  <ArrowLeftRightIcon class="icon" />                </button>                <button type="button" class="kanban-handle" aria-pressed="false" aria-label="Drag Draft the launch post">                  <GripVerticalIcon class="icon" />                </button>              </span>            </div>            <div class="flex items-center justify-between gap-xs">              <span class="badge badge-sm">Writing</span>              <span class="avatar avatar-xs" role="img" aria-label="Mei Kato">MK</span>            </div>          </article>        </li>        <li class="kanban-item" data-value="table">          <article class="card gap-xs">            <div class="card-header">              <p class="card-title">Design the comparison table</p>              <span class="card-action kanban-controls">                <button type="button" class="kanban-move" popovertarget="launch-mover" aria-label="Move Design the comparison table">                  <ArrowLeftRightIcon class="icon" />                </button>                <button type="button" class="kanban-handle" aria-pressed="false" aria-label="Drag Design the comparison table">                  <GripVerticalIcon class="icon" />                </button>              </span>            </div>            <div class="flex items-center justify-between gap-xs">              <span class="badge badge-sm">Design</span>              <span class="avatar avatar-xs" role="img" aria-label="Yi-ching Lin">YL</span>            </div>          </article>        </li>      </ol>      <p class="kanban-empty">Nothing in progress</p>    </section>    <section class="kanban-column" data-value="review" aria-labelledby="launch-review">      <header class="kanban-header">        <h3 class="kanban-title" id="launch-review">In review</h3>      </header>      <ol class="kanban-items"></ol>      <p class="kanban-empty">Nothing in review</p>    </section>    <section class="kanban-column" data-value="done" aria-labelledby="launch-done">      <header class="kanban-header">        <h3 class="kanban-title" id="launch-done">Done</h3>      </header>      <ol class="kanban-items">        <li class="kanban-item" data-value="name">          <article class="card gap-xs">            <div class="card-header">              <p class="card-title">Name the release</p>              <span class="card-action kanban-controls">                <button type="button" class="kanban-move" popovertarget="launch-mover" aria-label="Move Name the release">                  <ArrowLeftRightIcon class="icon" />                </button>                <button type="button" class="kanban-handle" aria-pressed="false" aria-label="Drag Name the release">                  <GripVerticalIcon class="icon" />                </button>              </span>            </div>            <div class="flex items-center justify-between gap-xs">              <span class="badge badge-sm">Brand</span>              <span class="avatar avatar-xs" role="img" aria-label="Po-han Chen">PC</span>            </div>          </article>        </li>        <li class="kanban-item" data-value="date">          <article class="card gap-xs">            <div class="card-header">              <p class="card-title">Book the launch date</p>              <span class="card-action kanban-controls">                <button type="button" class="kanban-move" popovertarget="launch-mover" aria-label="Move Book the launch date">                  <ArrowLeftRightIcon class="icon" />                </button>                <button type="button" class="kanban-handle" aria-pressed="false" aria-label="Drag Book the launch date">                  <GripVerticalIcon class="icon" />                </button>              </span>            </div>            <div class="flex items-center justify-between gap-xs">              <span class="badge badge-sm">Planning</span>              <span class="avatar avatar-xs" role="img" aria-label="Ana Souza">AS</span>            </div>          </article>        </li>      </ol>      <p class="kanban-empty">Nothing done yet</p>    </section>    <div class="popover popover-end" popover id="launch-mover">      <form class="kanban-mover">        <label class="field">Column<select class="select" name="column"></select></label>        <label class="field">Position<select class="select" name="position"></select></label>        <div class="kanban-mover-actions">          <button type="button" class="btn btn-sm" popovertarget="launch-mover" popovertargetaction="hide">            Cancel          </button>          <button type="submit" class="btn btn-sm btn-primary">Move</button>        </div>      </form>    </div>    <div class="kanban-preview" popover="manual" aria-hidden="true"></div>    <p class="kanban-status" role="status"></p>  </div></template>
손잡이를 다른 열로 드래그하세요. 카드가 놓일 자리를 선이 표시하고, 포인터가 끝 가까이에 있는 동안 보드가 스크롤됩니다. 키보드로는 손잡이에 포커스를 두고 Space 키를 누른 뒤 방향키로 자리를 고르고 Space 키를 다시 누르세요. 손잡이 옆의 버튼을 누르면 드래그 없이 카드를 옮길 수 있습니다.

정렬 가능 목록은 목록 하나의 순서를 정합니다. 항목이 다른 목록으로도 옮겨 가고, 항목이 속한 목록이 단계, 담당자, 상태처럼 그 항목에 관한 정보를 나타낸다면 칸반을 사용하세요.

#스타일시트가 그리는 요소

  • 보드는 가로로 스크롤되는 행입니다. 위 예시의 h(376)처럼, 또는 보드 페이지의 메인 영역처럼 높이를 지정하면 열이 그 높이에서 멈춥니다.
  • 열은 트레이입니다. 색조와 가는 선으로 오목하게 표현하며, 너비는 --kanban-column-width이고 보드 너비에서 2rem을 뺀 값을 넘지 않으므로 휴대폰에서는 다음 열이 가장자리에 보입니다. 높이는 담긴 내용만큼입니다. 열의 목록인 kanban-items만 스크롤되며, 그 위의 헤더는 제자리에 남습니다.
  • 모서리 하나, 선 하나. 보드에 담긴 카드는 --kanban-radius와 --kanban-padding을 따릅니다. 열의 모서리 반경은 이 반경에 항목 둘레의 여백인 --kanban-inset을 더한 값이고, 열의 제목은 카드의 텍스트가 시작하는 선에서 시작합니다.
  • 두 컨트롤은 한 쌍입니다. 각각 24px이고 손가락으로 조작할 때는 대상의 높이가 44px이며, 서로의 중간까지만 넓어지므로 옆 컨트롤 대신 반응하지 않습니다. 핸들에는 손잡이 아이콘을, kanban-move에는 서로 엇갈리는 화살표 두 개의 아이콘을 넣으며, 둘 다 마크업에 쓰는 Master Icons 그림입니다. 둘 다 포인터나 키보드가 닿기 전까지는 아이콘만 표시합니다. touch-action: none은 핸들에만 적용되므로, 카드의 다른 곳에서 시작한 스와이프는 여전히 스크롤합니다. kanban-controls는 이 한 쌍을 항목 첫 줄의 끝에 둡니다. 손잡이의 점이 자기 상자의 가장자리에서 안쪽으로 들어가 있는 만큼인 .5rem만큼 카드의 패딩 안으로 걸쳐 들어가므로 손잡이는 그 아래 아바타가 끝나는 가장자리에 맞고, 제목의 첫 줄을 기준으로 세로 가운데에 놓입니다.
  • 이동 버튼은 기다립니다. 포인터를 올릴 수 있는 기기에서는 포인터나 키보드가 해당 항목에 닿을 때까지 kanban-move를 그리지 않으므로, 보드에는 카드마다 손잡이 하나만 보입니다. 터치 화면에서는 항상 그립니다.
  • 옮기는 동안 항목은 제자리에 남아 흐려지므로 사용자는 항목이 어디서 왔는지 알 수 있고, 손잡이는 오목한 영역 안에 놓입니다.
  • 놓일 자리는 간격 한가운데의 선입니다. kanban-item-target으로 표시된 항목 앞이나, kanban-items-target으로 표시된 목록의 마지막 항목 뒤에 그립니다. 자리를 비켜 주는 항목은 없습니다. 보드는 포인터 아래에서 움직이지 않으며, 그래서 놓일 자리가 제 움직임을 쫓아 흔들리는 일이 없습니다.
  • 빈 열은 목록 대신 kanban-empty를 표시합니다. 얕은 오목한 영역 안의 짧은 문구입니다. 항목이 놓일 자리가 되면 이 오목한 영역에 표식 색의 링이 둘러집니다.
  • 옮기는 시트인 kanban-preview는 항목 너비의 작은 솟은 시트에 항목의 이름을 담은 것입니다. 수동 팝오버이므로 최상위 레이어에 놓여 어떤 열의 스크롤에도 잘리지 않으며, 카드의 사본을 담지 않습니다. 따라서 중복된 id, 필드, 이미지가 생기지 않습니다. 포인터를 놓으면 시트는 항목이 들어간 자리로 미끄러지듯 이동한 뒤 사라집니다.

동작 줄이기 설정이 켜져 있으면 시트는 미끄러지듯 이동하지 않고 항목은 서서히 나타나지 않습니다. 강제 색상 모드에서는 열, 오목한 영역, 시트에 윤곽선이 그려지고 선은 시스템 강조 색으로 그려집니다.

#동작

kanban 동작은 kanban 클래스가 있는 루트 요소를 받아, 연결한 동작을 해제하는 함수를 반환합니다.

app.js
import { kanban } from '@master/ui/behaviors/kanban.js'const board = kanban(document.querySelector('.kanban'))board.value// [{ value: 'backlog', items: ['emails', 'pricing', 'tour', 'translate'] }, { value: 'progress', items: ['post', 'table'] }, …]board.move('pricing', 'review', 0)// The board dispatches input, then change, once for each move that changed it.document.querySelector('.kanban').addEventListener('change', (event) => {  if (event.target === event.currentTarget) save(board.value)})
  • 포인터. 핸들을 누른 채 4px 넘게 움직이면 항목을 집어 듭니다. 마우스, 펜, 터치 모두 같으며, 드래그를 시작한 포인터만 항목을 옮길 수 있습니다. 항목이 놓일 곳은 포인터 아래의 열, 또는 가로 방향으로 가장 가까운 열이며, 그 열에서 가운데가 포인터보다 아래에 있는 첫 번째 항목의 앞입니다. 포인터가 끝 가까이에 있는 동안 보드는 가로로, 그 열의 목록은 세로로 스크롤됩니다. 포인터를 놓으면 이동이 확정됩니다. 집어 든 자리에서 놓으면 아무것도 바뀌지 않으며, 보드 밖에서 놓거나, Escape 키를 누르거나, 포인터가 취소되거나, 포인터 캡처를 빼앗기면 항목은 원래 자리에 그대로 있습니다.
  • 항목 전체(마우스). 마우스로는 링크, 버튼, 필드가 아닌 곳이면 항목의 어디를 눌러도 집어 들 수 있으며, 그 위에서는 커서가 손 모양이 됩니다. 손가락은 핸들로만 항목을 옮깁니다. 항목의 다른 곳을 누르는 것은 목록을 스크롤하는 방법이기 때문입니다. 항목을 누르고 움직이지 않으면 그 자리에 있는 것을 클릭한 것일 뿐입니다.
  • 키보드. 핸들에서 Enter 또는 Space 키를 누르면 항목을 집어 듭니다. 핸들을 움직이지 않고 누를 때도 마찬가지입니다. 이어서 방향키로 자리를 고르면 선이 그 자리를 표시합니다. 항목을 집어 들기 전에는 방향키가 아무 동작도 하지 않으므로, 스크린 리더 자체의 방향키 조작은 그대로 작동합니다. Enter 또는 Space 키는 이동을 확정하고, Escape 키는 취소하며, 핸들에서 포커스가 벗어나도 확정됩니다.
  • 이동 폼. 항목 안의 버튼 가운데 popovertarget이 kanban-mover 폼을 담은 팝오버인 버튼은 그 항목에 대한 이동 폼을 엽니다. 팝오버를 열고 닫는 일은 브라우저가 합니다. 동작은 이름이 column인 select에 열을, 이름이 position인 select에 선택한 열의 자리를 써넣으며, 폼을 제출하면 이동이 확정됩니다. 드래그할 수 없고 키보드도 없는 사용자, 그리고 터치 화면에서 스크린 리더를 쓰는 사용자를 위한 방법입니다.
  • 하나의 경로. 포인터, 키보드, 이동 폼은 모두 move(item, column, index)를 거쳐 확정하며, 이 메서드는 직접 호출할 수도 있습니다. index는 그 열의 다른 항목들 사이에서의 자리입니다. 0은 첫 번째이고, 끝을 넘는 숫자는 맨 끝입니다. 보드를 바꾸는 확정은 항목 노드 자체를 옮기고, 항목이 보이도록 스크롤하고, 핸들에 포커스를 주고, 이벤트를 발생시킵니다. 브라우저가 지원하면 moveBefore()를 사용하므로 필드의 텍스트와 포커스가 유지됩니다. 항목이 이미 있는 자리로 확정하면 이벤트가 발생하지 않습니다.
  • 이동은 그려집니다. 브라우저가 요소 범위의 뷰 전환을 지원하면 확정할 때 보드에서 전환을 시작합니다. 모든 항목은 속한 목록에 의해 잘린 채 새 자리로 미끄러지듯 이동하고, 확정은 한 프레임 뒤에 끝나므로 이때 move는 프로미스를 반환합니다. 그 밖의 브라우저와 동작 줄이기 설정에서는 항목이 바로 제자리에 놓입니다. 이동에는 160ms가 걸리며 그동안 보드는 누름을 받지 않습니다.
  • 페이지가 옮길 때. 페이지에서 호출한 move는 항목을 보이도록 스크롤하지 않고 포커스도 옮기지 않습니다. 숨겨진 열로는 옮기지 않으며, 이전 이동이 아직 그려지는 동안에는 거부됩니다. 핸들이 disabled인 항목은 이동 폼을 포함한 어떤 방법으로도 제자리에 머뭅니다.
  • 값은 배치입니다. 열마다 { value, items } 하나씩, 열의 순서대로 나열합니다. 값은 확정된 배치이며, 고르는 중인 자리는 반영하지 않습니다. 값을 설정하면 보드가 그 배치로 정렬되며, 이때는 이벤트가 발생하지 않습니다. 보드에 없는 열이나 항목을 가리키거나 같은 것을 두 번 가리키는 값은 거부되고 보드는 그대로 유지되므로, 도중에 카드가 사라지는 일이 없습니다. 값에서 빠진 항목은 자기 열에 남아, 값이 지정한 항목들 뒤에 놓입니다.
  • 이동 중의 변경. 항목을 옮기는 중에 값을 설정하거나 move를 호출하는 등 보드의 배치를 바꾸는 일이 생기면 진행 중인 이동을 먼저 취소합니다.
  • 안내 메시지. 집어 들기, 자리 선택, 놓기, 취소는 각각 kanban-status 영역에서 항목의 이름, 열, 자리와 함께 안내합니다(예: "Price the annual plan: In review, position 1 of 1."). 페이지 언어로 안내하려면 messages를 전달하세요. 항목은 aria-label로, 없으면 항목에 담긴 첫 텍스트로 부르고, 열은 제목으로 부릅니다.

열의 순서는 마크업의 순서입니다. hidden이 있는 열은 항목을 받지 않으며 키보드로 열을 고를 때 건너뜁니다.

카드 안의 필드와 이동 폼 자체의 select도 폼 안에서와 마찬가지로 input과 change를 보드를 거쳐 내보냅니다. 이동에 따른 이벤트는 target이 보드인 이벤트입니다.

#이 동작이 측정하는 것

동작은 속성을 바꾸고 위치와 크기는 스타일시트에 맡깁니다. 스크롤되는 열을 가로지르는 드래그의 위치는 그런 방식으로 알아낼 수 없으므로, 이 동작만은 계약에 포함된 한도 안에서 측정을 합니다. 포인터가 열과 항목 사이 어디에 있는지 읽고, 끝 가까이에서 보드와 목록을 스크롤하며, 옮기는 시트에 사용자 지정 속성 세 개(--kanban-x, --kanban-y, --kanban-width)를 씁니다. 색상, 그림자, 그 밖의 스타일은 설정하지 않으며, 자리를 나타내는 표시는 스타일시트가 그리는 클래스입니다.

#키보드

키동작
Enter, Space핸들에서 항목을 집어 듭니다. 다시 누르면 선택한 자리에 항목을 놓습니다.
ArrowUp, ArrowDown항목이 놓일 열에서 앞이나 뒤의 자리를 선택합니다.
ArrowLeft, ArrowRight화면에 보이는 방향대로 옆의 열을 선택합니다. 오른쪽에서 왼쪽으로 읽는 레이아웃에서는 방향이 반대입니다. 자리는 그대로 유지되며, 열의 항목 수가 그보다 적으면 그 열의 마지막 자리가 됩니다.
Home, End그 열의 첫 번째 또는 마지막 자리를 선택합니다.
Escape항목을 원래 자리에 두고 포커스는 핸들에 유지합니다. 드래그 중이면 드래그를 끝냅니다.
Tab선택한 자리에 항목을 놓은 뒤, Tab 키의 기본 동작대로 핸들을 벗어납니다.

#더 작은 보드

열과 카드는 보드의 사용자 지정 속성을 따릅니다. 여기서는 --kanban-column-width로 열을 좁혔고, 각 항목은 한 줄짜리 평평한 카드이며, 마지막 열은 비어 있습니다.

더 작은 보드

<div class="kanban" role="group" aria-label="Candidates" style="--kanban-column-width: 13rem">  <section class="kanban-column" data-value="applied" aria-labelledby="hiring-applied">    <header class="kanban-header">      <h3 class="kanban-title" id="hiring-applied">Applied</h3>    </header>    <ol class="kanban-items">      <li class="kanban-item" data-value="rivera">        <div class="card card-flat flex-row items-center gap-2xs">          <span class="grow(1) min-w(0) fg-text-strong">Dana Rivera</span>          <span class="kanban-controls">            <button type="button" class="kanban-move" popovertarget="hiring-mover" aria-label="Move Dana Rivera">              <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.2559 2.3817A0.4996 0.4996 0 0 0 4.1667 2.6667L4.1673 13.3578A0.5 0.5 0 0 0 5.1613 13.4067L5.1667 13.3333L5.1653 2.6288A0.5007 0.5007 0 0 0 5.0775 2.3817A0.7044 0.7044 0 0 0 4.2559 2.3817Z" fill="currentColor" stroke="none" fill-rule="evenodd" transform="rotate(90 8 8)" /><path d="M2.3333 5L4.5253 2.8081A0.2 0.2 0 0 1 4.8081 2.8081L7 5" transform="rotate(90 8 8)" /><path d="M11.8333 13.3333L11.8327 2.6422A0.5 0.5 0 0 0 10.8387 2.5933L10.8333 2.6667L10.8347 13.3712A0.5007 0.5007 0 0 0 10.9225 13.6183A0.7044 0.7044 0 0 0 11.7441 13.6183A0.4996 0.4996 0 0 0 11.8333 13.3333Z" fill="currentColor" stroke="none" fill-rule="evenodd" transform="rotate(90 8 8)" /><path d="M9 11L11.1919 13.1919A0.2 0.2 0 0 0 11.4747 13.1919L13.6667 11" transform="rotate(90 8 8)" />              </svg>            </button>            <button type="button" class="kanban-handle" aria-pressed="false" aria-label="Drag Dana Rivera">              <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">                <circle cx="6" cy="4" r="1" fill="currentColor" stroke="none" /><circle cx="10" cy="4" r="1" fill="currentColor" stroke="none" /><circle cx="6" cy="8" r="1" fill="currentColor" stroke="none" /><circle cx="10" cy="8" r="1" fill="currentColor" stroke="none" /><circle cx="6" cy="12" r="1" fill="currentColor" stroke="none" /><circle cx="10" cy="12" r="1" fill="currentColor" stroke="none" />              </svg>            </button>          </span>        </div>      </li>      <li class="kanban-item" data-value="okafor">        <div class="card card-flat flex-row items-center gap-2xs">          <span class="grow(1) min-w(0) fg-text-strong">Chidi Okafor</span>          <span class="kanban-controls">            <button type="button" class="kanban-move" popovertarget="hiring-mover" aria-label="Move Chidi Okafor">              <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.2559 2.3817A0.4996 0.4996 0 0 0 4.1667 2.6667L4.1673 13.3578A0.5 0.5 0 0 0 5.1613 13.4067L5.1667 13.3333L5.1653 2.6288A0.5007 0.5007 0 0 0 5.0775 2.3817A0.7044 0.7044 0 0 0 4.2559 2.3817Z" fill="currentColor" stroke="none" fill-rule="evenodd" transform="rotate(90 8 8)" /><path d="M2.3333 5L4.5253 2.8081A0.2 0.2 0 0 1 4.8081 2.8081L7 5" transform="rotate(90 8 8)" /><path d="M11.8333 13.3333L11.8327 2.6422A0.5 0.5 0 0 0 10.8387 2.5933L10.8333 2.6667L10.8347 13.3712A0.5007 0.5007 0 0 0 10.9225 13.6183A0.7044 0.7044 0 0 0 11.7441 13.6183A0.4996 0.4996 0 0 0 11.8333 13.3333Z" fill="currentColor" stroke="none" fill-rule="evenodd" transform="rotate(90 8 8)" /><path d="M9 11L11.1919 13.1919A0.2 0.2 0 0 0 11.4747 13.1919L13.6667 11" transform="rotate(90 8 8)" />              </svg>            </button>            <button type="button" class="kanban-handle" aria-pressed="false" aria-label="Drag Chidi Okafor">              <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">                <circle cx="6" cy="4" r="1" fill="currentColor" stroke="none" /><circle cx="10" cy="4" r="1" fill="currentColor" stroke="none" /><circle cx="6" cy="8" r="1" fill="currentColor" stroke="none" /><circle cx="10" cy="8" r="1" fill="currentColor" stroke="none" /><circle cx="6" cy="12" r="1" fill="currentColor" stroke="none" /><circle cx="10" cy="12" r="1" fill="currentColor" stroke="none" />              </svg>            </button>          </span>        </div>      </li>      <li class="kanban-item" data-value="sato">        <div class="card card-flat flex-row items-center gap-2xs">          <span class="grow(1) min-w(0) fg-text-strong">Hana Sato</span>          <span class="kanban-controls">            <button type="button" class="kanban-move" popovertarget="hiring-mover" aria-label="Move Hana Sato">              <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.2559 2.3817A0.4996 0.4996 0 0 0 4.1667 2.6667L4.1673 13.3578A0.5 0.5 0 0 0 5.1613 13.4067L5.1667 13.3333L5.1653 2.6288A0.5007 0.5007 0 0 0 5.0775 2.3817A0.7044 0.7044 0 0 0 4.2559 2.3817Z" fill="currentColor" stroke="none" fill-rule="evenodd" transform="rotate(90 8 8)" /><path d="M2.3333 5L4.5253 2.8081A0.2 0.2 0 0 1 4.8081 2.8081L7 5" transform="rotate(90 8 8)" /><path d="M11.8333 13.3333L11.8327 2.6422A0.5 0.5 0 0 0 10.8387 2.5933L10.8333 2.6667L10.8347 13.3712A0.5007 0.5007 0 0 0 10.9225 13.6183A0.7044 0.7044 0 0 0 11.7441 13.6183A0.4996 0.4996 0 0 0 11.8333 13.3333Z" fill="currentColor" stroke="none" fill-rule="evenodd" transform="rotate(90 8 8)" /><path d="M9 11L11.1919 13.1919A0.2 0.2 0 0 0 11.4747 13.1919L13.6667 11" transform="rotate(90 8 8)" />              </svg>            </button>            <button type="button" class="kanban-handle" aria-pressed="false" aria-label="Drag Hana Sato">              <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">                <circle cx="6" cy="4" r="1" fill="currentColor" stroke="none" /><circle cx="10" cy="4" r="1" fill="currentColor" stroke="none" /><circle cx="6" cy="8" r="1" fill="currentColor" stroke="none" /><circle cx="10" cy="8" r="1" fill="currentColor" stroke="none" /><circle cx="6" cy="12" r="1" fill="currentColor" stroke="none" /><circle cx="10" cy="12" r="1" fill="currentColor" stroke="none" />              </svg>            </button>          </span>        </div>      </li>    </ol>    <p class="kanban-empty">No applicants</p>  </section>  <section class="kanban-column" data-value="interview" aria-labelledby="hiring-interview">    <header class="kanban-header">      <h3 class="kanban-title" id="hiring-interview">Interview</h3>    </header>    <ol class="kanban-items">      <li class="kanban-item" data-value="meyer">        <div class="card card-flat flex-row items-center gap-2xs">          <span class="grow(1) min-w(0) fg-text-strong">Lena Meyer</span>          <span class="kanban-controls">            <button type="button" class="kanban-move" popovertarget="hiring-mover" aria-label="Move Lena Meyer">              <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.2559 2.3817A0.4996 0.4996 0 0 0 4.1667 2.6667L4.1673 13.3578A0.5 0.5 0 0 0 5.1613 13.4067L5.1667 13.3333L5.1653 2.6288A0.5007 0.5007 0 0 0 5.0775 2.3817A0.7044 0.7044 0 0 0 4.2559 2.3817Z" fill="currentColor" stroke="none" fill-rule="evenodd" transform="rotate(90 8 8)" /><path d="M2.3333 5L4.5253 2.8081A0.2 0.2 0 0 1 4.8081 2.8081L7 5" transform="rotate(90 8 8)" /><path d="M11.8333 13.3333L11.8327 2.6422A0.5 0.5 0 0 0 10.8387 2.5933L10.8333 2.6667L10.8347 13.3712A0.5007 0.5007 0 0 0 10.9225 13.6183A0.7044 0.7044 0 0 0 11.7441 13.6183A0.4996 0.4996 0 0 0 11.8333 13.3333Z" fill="currentColor" stroke="none" fill-rule="evenodd" transform="rotate(90 8 8)" /><path d="M9 11L11.1919 13.1919A0.2 0.2 0 0 0 11.4747 13.1919L13.6667 11" transform="rotate(90 8 8)" />              </svg>            </button>            <button type="button" class="kanban-handle" aria-pressed="false" aria-label="Drag Lena Meyer">              <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">                <circle cx="6" cy="4" r="1" fill="currentColor" stroke="none" /><circle cx="10" cy="4" r="1" fill="currentColor" stroke="none" /><circle cx="6" cy="8" r="1" fill="currentColor" stroke="none" /><circle cx="10" cy="8" r="1" fill="currentColor" stroke="none" /><circle cx="6" cy="12" r="1" fill="currentColor" stroke="none" /><circle cx="10" cy="12" r="1" fill="currentColor" stroke="none" />              </svg>            </button>          </span>        </div>      </li>    </ol>    <p class="kanban-empty">No interviews</p>  </section>  <section class="kanban-column" data-value="offer" aria-labelledby="hiring-offer">    <header class="kanban-header">      <h3 class="kanban-title" id="hiring-offer">Offer</h3>    </header>    <ol class="kanban-items"></ol>    <p class="kanban-empty">No offers yet</p>  </section>  <div class="popover popover-end" popover id="hiring-mover">    <form class="kanban-mover">      <label class="field">Column<select class="select" name="column"></select></label>      <label class="field">Position<select class="select" name="position"></select></label>      <div class="kanban-mover-actions">        <button type="button" class="btn btn-sm" popovertarget="hiring-mover" popovertargetaction="hide">          Cancel        </button>        <button type="submit" class="btn btn-sm btn-primary">Move</button>      </div>    </form>  </div>  <div class="kanban-preview" popover="manual" aria-hidden="true"></div>  <p class="kanban-status" role="status"></p></div><script type="module">  import { attach } from '@master/ui/behaviors'  attach()</script>
import { useEffect, useRef } from 'react'import { attach } from '@master/ui/behaviors'import ArrowLeftRightIcon from '@master/icons-react/native/16/soft/arrow-left-right'import GripVerticalIcon from '@master/icons-react/native/16/soft/grip-vertical'export function Example() {  const root = useRef<HTMLDivElement>(null)  useEffect(() => attach(root.current!), [])  return (    <div ref={root} className="kanban" role="group" aria-label="Candidates" style={{ '--kanban-column-width': '13rem' } as React.CSSProperties}>      <section className="kanban-column" data-value="applied" aria-labelledby="hiring-applied">        <header className="kanban-header">          <h3 className="kanban-title" id="hiring-applied">Applied</h3>        </header>        <ol className="kanban-items">          <li className="kanban-item" data-value="rivera">            <div className="card card-flat flex-row items-center gap-2xs">              <span className="grow(1) min-w(0) fg-text-strong">Dana Rivera</span>              <span className="kanban-controls">                <button type="button" className="kanban-move" popoverTarget="hiring-mover" aria-label="Move Dana Rivera">                  <ArrowLeftRightIcon className="icon" />                </button>                <button type="button" className="kanban-handle" aria-pressed="false" aria-label="Drag Dana Rivera">                  <GripVerticalIcon className="icon" />                </button>              </span>            </div>          </li>          <li className="kanban-item" data-value="okafor">            <div className="card card-flat flex-row items-center gap-2xs">              <span className="grow(1) min-w(0) fg-text-strong">Chidi Okafor</span>              <span className="kanban-controls">                <button type="button" className="kanban-move" popoverTarget="hiring-mover" aria-label="Move Chidi Okafor">                  <ArrowLeftRightIcon className="icon" />                </button>                <button type="button" className="kanban-handle" aria-pressed="false" aria-label="Drag Chidi Okafor">                  <GripVerticalIcon className="icon" />                </button>              </span>            </div>          </li>          <li className="kanban-item" data-value="sato">            <div className="card card-flat flex-row items-center gap-2xs">              <span className="grow(1) min-w(0) fg-text-strong">Hana Sato</span>              <span className="kanban-controls">                <button type="button" className="kanban-move" popoverTarget="hiring-mover" aria-label="Move Hana Sato">                  <ArrowLeftRightIcon className="icon" />                </button>                <button type="button" className="kanban-handle" aria-pressed="false" aria-label="Drag Hana Sato">                  <GripVerticalIcon className="icon" />                </button>              </span>            </div>          </li>        </ol>        <p className="kanban-empty">No applicants</p>      </section>      <section className="kanban-column" data-value="interview" aria-labelledby="hiring-interview">        <header className="kanban-header">          <h3 className="kanban-title" id="hiring-interview">Interview</h3>        </header>        <ol className="kanban-items">          <li className="kanban-item" data-value="meyer">            <div className="card card-flat flex-row items-center gap-2xs">              <span className="grow(1) min-w(0) fg-text-strong">Lena Meyer</span>              <span className="kanban-controls">                <button type="button" className="kanban-move" popoverTarget="hiring-mover" aria-label="Move Lena Meyer">                  <ArrowLeftRightIcon className="icon" />                </button>                <button type="button" className="kanban-handle" aria-pressed="false" aria-label="Drag Lena Meyer">                  <GripVerticalIcon className="icon" />                </button>              </span>            </div>          </li>        </ol>        <p className="kanban-empty">No interviews</p>      </section>      <section className="kanban-column" data-value="offer" aria-labelledby="hiring-offer">        <header className="kanban-header">          <h3 className="kanban-title" id="hiring-offer">Offer</h3>        </header>        <ol className="kanban-items"></ol>        <p className="kanban-empty">No offers yet</p>      </section>      <div className="popover popover-end" popover="" id="hiring-mover">        <form className="kanban-mover">          <label className="field">Column<select className="select" name="column"></select></label>          <label className="field">Position<select className="select" name="position"></select></label>          <div className="kanban-mover-actions">            <button type="button" className="btn btn-sm" popoverTarget="hiring-mover" popoverTargetAction="hide">              Cancel            </button>            <button type="submit" className="btn btn-sm btn-primary">Move</button>          </div>        </form>      </div>      <div className="kanban-preview" popover="manual" aria-hidden="true"></div>      <p className="kanban-status" role="status"></p>    </div>  )}
<script>  import { attach } from '@master/ui/behaviors'  import ArrowLeftRightIcon from '@master/icons-svelte/native/16/soft/arrow-left-right'  import GripVerticalIcon from '@master/icons-svelte/native/16/soft/grip-vertical'</script><div class="kanban" role="group" aria-label="Candidates" style="--kanban-column-width: 13rem" {@attach attach}>  <section class="kanban-column" data-value="applied" aria-labelledby="hiring-applied">    <header class="kanban-header">      <h3 class="kanban-title" id="hiring-applied">Applied</h3>    </header>    <ol class="kanban-items">      <li class="kanban-item" data-value="rivera">        <div class="card card-flat flex-row items-center gap-2xs">          <span class="grow(1) min-w(0) fg-text-strong">Dana Rivera</span>          <span class="kanban-controls">            <button type="button" class="kanban-move" popovertarget="hiring-mover" aria-label="Move Dana Rivera">              <ArrowLeftRightIcon class="icon" />            </button>            <button type="button" class="kanban-handle" aria-pressed="false" aria-label="Drag Dana Rivera">              <GripVerticalIcon class="icon" />            </button>          </span>        </div>      </li>      <li class="kanban-item" data-value="okafor">        <div class="card card-flat flex-row items-center gap-2xs">          <span class="grow(1) min-w(0) fg-text-strong">Chidi Okafor</span>          <span class="kanban-controls">            <button type="button" class="kanban-move" popovertarget="hiring-mover" aria-label="Move Chidi Okafor">              <ArrowLeftRightIcon class="icon" />            </button>            <button type="button" class="kanban-handle" aria-pressed="false" aria-label="Drag Chidi Okafor">              <GripVerticalIcon class="icon" />            </button>          </span>        </div>      </li>      <li class="kanban-item" data-value="sato">        <div class="card card-flat flex-row items-center gap-2xs">          <span class="grow(1) min-w(0) fg-text-strong">Hana Sato</span>          <span class="kanban-controls">            <button type="button" class="kanban-move" popovertarget="hiring-mover" aria-label="Move Hana Sato">              <ArrowLeftRightIcon class="icon" />            </button>            <button type="button" class="kanban-handle" aria-pressed="false" aria-label="Drag Hana Sato">              <GripVerticalIcon class="icon" />            </button>          </span>        </div>      </li>    </ol>    <p class="kanban-empty">No applicants</p>  </section>  <section class="kanban-column" data-value="interview" aria-labelledby="hiring-interview">    <header class="kanban-header">      <h3 class="kanban-title" id="hiring-interview">Interview</h3>    </header>    <ol class="kanban-items">      <li class="kanban-item" data-value="meyer">        <div class="card card-flat flex-row items-center gap-2xs">          <span class="grow(1) min-w(0) fg-text-strong">Lena Meyer</span>          <span class="kanban-controls">            <button type="button" class="kanban-move" popovertarget="hiring-mover" aria-label="Move Lena Meyer">              <ArrowLeftRightIcon class="icon" />            </button>            <button type="button" class="kanban-handle" aria-pressed="false" aria-label="Drag Lena Meyer">              <GripVerticalIcon class="icon" />            </button>          </span>        </div>      </li>    </ol>    <p class="kanban-empty">No interviews</p>  </section>  <section class="kanban-column" data-value="offer" aria-labelledby="hiring-offer">    <header class="kanban-header">      <h3 class="kanban-title" id="hiring-offer">Offer</h3>    </header>    <ol class="kanban-items"></ol>    <p class="kanban-empty">No offers yet</p>  </section>  <div class="popover popover-end" popover id="hiring-mover">    <form class="kanban-mover">      <label class="field">Column<select class="select" name="column"></select></label>      <label class="field">Position<select class="select" name="position"></select></label>      <div class="kanban-mover-actions">        <button type="button" class="btn btn-sm" popovertarget="hiring-mover" popovertargetaction="hide">          Cancel        </button>        <button type="submit" class="btn btn-sm btn-primary">Move</button>      </div>    </form>  </div>  <div class="kanban-preview" popover="manual" aria-hidden="true"></div>  <p class="kanban-status" role="status"></p></div>
<script setup>import { onMounted, onUnmounted, ref } from 'vue'import { attach } from '@master/ui/behaviors'import ArrowLeftRightIcon from '@master/icons-vue/native/16/soft/arrow-left-right'import GripVerticalIcon from '@master/icons-vue/native/16/soft/grip-vertical'const root = ref(null)let detachonMounted(() => { detach = attach(root.value) })onUnmounted(() => detach?.())</script><template>  <div ref="root" class="kanban" role="group" aria-label="Candidates" style="--kanban-column-width: 13rem">    <section class="kanban-column" data-value="applied" aria-labelledby="hiring-applied">      <header class="kanban-header">        <h3 class="kanban-title" id="hiring-applied">Applied</h3>      </header>      <ol class="kanban-items">        <li class="kanban-item" data-value="rivera">          <div class="card card-flat flex-row items-center gap-2xs">            <span class="grow(1) min-w(0) fg-text-strong">Dana Rivera</span>            <span class="kanban-controls">              <button type="button" class="kanban-move" popovertarget="hiring-mover" aria-label="Move Dana Rivera">                <ArrowLeftRightIcon class="icon" />              </button>              <button type="button" class="kanban-handle" aria-pressed="false" aria-label="Drag Dana Rivera">                <GripVerticalIcon class="icon" />              </button>            </span>          </div>        </li>        <li class="kanban-item" data-value="okafor">          <div class="card card-flat flex-row items-center gap-2xs">            <span class="grow(1) min-w(0) fg-text-strong">Chidi Okafor</span>            <span class="kanban-controls">              <button type="button" class="kanban-move" popovertarget="hiring-mover" aria-label="Move Chidi Okafor">                <ArrowLeftRightIcon class="icon" />              </button>              <button type="button" class="kanban-handle" aria-pressed="false" aria-label="Drag Chidi Okafor">                <GripVerticalIcon class="icon" />              </button>            </span>          </div>        </li>        <li class="kanban-item" data-value="sato">          <div class="card card-flat flex-row items-center gap-2xs">            <span class="grow(1) min-w(0) fg-text-strong">Hana Sato</span>            <span class="kanban-controls">              <button type="button" class="kanban-move" popovertarget="hiring-mover" aria-label="Move Hana Sato">                <ArrowLeftRightIcon class="icon" />              </button>              <button type="button" class="kanban-handle" aria-pressed="false" aria-label="Drag Hana Sato">                <GripVerticalIcon class="icon" />              </button>            </span>          </div>        </li>      </ol>      <p class="kanban-empty">No applicants</p>    </section>    <section class="kanban-column" data-value="interview" aria-labelledby="hiring-interview">      <header class="kanban-header">        <h3 class="kanban-title" id="hiring-interview">Interview</h3>      </header>      <ol class="kanban-items">        <li class="kanban-item" data-value="meyer">          <div class="card card-flat flex-row items-center gap-2xs">            <span class="grow(1) min-w(0) fg-text-strong">Lena Meyer</span>            <span class="kanban-controls">              <button type="button" class="kanban-move" popovertarget="hiring-mover" aria-label="Move Lena Meyer">                <ArrowLeftRightIcon class="icon" />              </button>              <button type="button" class="kanban-handle" aria-pressed="false" aria-label="Drag Lena Meyer">                <GripVerticalIcon class="icon" />              </button>            </span>          </div>        </li>      </ol>      <p class="kanban-empty">No interviews</p>    </section>    <section class="kanban-column" data-value="offer" aria-labelledby="hiring-offer">      <header class="kanban-header">        <h3 class="kanban-title" id="hiring-offer">Offer</h3>      </header>      <ol class="kanban-items"></ol>      <p class="kanban-empty">No offers yet</p>    </section>    <div class="popover popover-end" popover id="hiring-mover">      <form class="kanban-mover">        <label class="field">Column<select class="select" name="column"></select></label>        <label class="field">Position<select class="select" name="position"></select></label>        <div class="kanban-mover-actions">          <button type="button" class="btn btn-sm" popovertarget="hiring-mover" popovertargetaction="hide">            Cancel          </button>          <button type="submit" class="btn btn-sm btn-primary">Move</button>        </div>      </form>    </div>    <div class="kanban-preview" popover="manual" aria-hidden="true"></div>    <p class="kanban-status" role="status"></p>  </div></template>

#스크립트 없이

보드는 섹션, 제목, 목록으로 이루어지므로 동작이 없어도 열 단위로 순서대로 읽히고 스크롤됩니다. 다만 아무것도 옮길 수 없습니다. 옮기려면 동작이 있거나 페이지가 순서를 직접 써야 합니다. 아무 일도 하지 않는 핸들과 이동 버튼은 없는 것만 못하므로, 스크립트 없이 실행될 수 있는 페이지에서는 스크립트가 준비된 뒤에 이 둘을 렌더링하세요.

팝오버 API가 없는 브라우저에서는 드래그하는 동안 포인터를 따라가는 것이 없습니다. 그래도 흐려진 항목과 선이 무엇을 옮기는지, 어디에 놓일지를 알려 줍니다.

#접근성

  • 각 열은 제목으로 이름을 지정한 <section>이므로 스크린 리더가 바로 이동할 수 있는 영역이 되고, 항목은 개수를 알려 주는 네이티브 목록입니다. 보드는 이름이 있는 role="group"입니다.
  • 드래그가 유일한 방법이 되는 일은 없습니다. 포인터로 할 수 있는 일은 키보드로 모두 할 수 있고, 이동 폼은 select 두 개와 버튼 하나로 같은 일을 합니다. 이것이 WCAG 2.5.7의 요구 사항입니다. 키보드 대안만으로는 터치를 사용하면서 드래그할 수 없는 사용자에게 닿지 못합니다.
  • 두 컨트롤의 이름에는 무엇을 옮기는지 밝히세요(예: "Drag Price the annual plan", "Move Price the annual plan").
  • 상태 영역은 처음부터 비어 있는 상태로 페이지에 두세요. 안내하는 순간에 추가한 영역은 스크린 리더가 읽지 못하는 경우가 많습니다.
  • 이동 후에는 옮긴 항목의 핸들에 포커스가 있고 항목이 화면에 보입니다. Tab 키로 핸들을 벗어나면 이동이 확정되며 포커스를 다시 끌어오지 않습니다.
  • 배치는 페이지에서 다른 데이터를 저장하는 방식과 같은 방식으로 change에서 저장하세요. 이동에 사용자가 볼 수 없는 효과가 있다면 보드 근처에 그 사실을 알리세요.

#React, Svelte, Vue

kanban 컴포넌트는 columns, items, 그리고 자신이 가진 배치로 열과 항목을 작성하고, 두 버튼의 속성을 항목의 마크업에 넘겨 스프레드하게 하며, 동작을 연결합니다. 이동이 확정되면 동작은 그릴 배치를 컴포넌트에 넘기고, 그 렌더링을 기다린 뒤에 포커스를 되돌리고 이벤트를 발생시킵니다. 컴포넌트를 쓰는 쪽이 그 배치를 받아들이지 않으면 보드는 그대로 유지됩니다. npx master-ui add kanban 명령을 실행해 프로젝트에 복사하세요. 컴포넌트의 구성과 사용 방법은 React, Svelte, Vue에서 확인할 수 있습니다.

열이 바뀐 항목은 새 목록에서 다시 렌더링됩니다. 프레임워크가 부모가 바뀐 항목을 렌더링하는 방식과 같습니다. 카드에 표시하는 내용은 카드 내부의 상태가 아니라 데이터에 두세요.

ui/kanban.tsx
'use client'import { useId, useLayoutEffect, useRef, useState, type ComponentProps, type ReactNode } from 'react'import { kanban, type KanbanMessages, type KanbanValue } from '@master/ui/behaviors/kanban.js'import { useBehavior } from './use-behavior'export type { KanbanValue }export interface KanbanColumn {  /** What the column stands for in the arrangement. */  value: string  /** The column's name: its title, and what the status and the mover call it. */  label: string}export interface KanbanItem {  /** What the item stands for in the arrangement. No other item has it. */  value: string  /** What the item is called: its handle and its move button are named with it. */  label: string  /** The column the item starts in, and stays in while the arrangement does not name it. The first by default. */  column?: string}export interface KanbanLabels<T extends KanbanItem> {  /** The accessible name of an item's handle. `Drag <label>` by default. */  drag?: (item: T) => string  /** The accessible name of the button that opens the mover for an item. `Move <label>` by default. */  move?: (item: T) => string  /** The mover's two fields and two buttons. */  column?: string  position?: string  confirm?: string  cancel?: string}/** What an item's own markup spreads on its two buttons. */export interface KanbanControls {  /** For the grip, an empty `<button>`: it carries the item with the pointer and the keys. */  handle: ComponentProps<'button'>  /** For the button that opens the mover, an empty `<button>`: a column and a position are chosen there. */  move: ComponentProps<'button'>}export interface KanbanProps<C extends KanbanColumn, T extends KanbanItem> extends Omit<ComponentProps<'div'>, 'children' | 'defaultValue' | 'ref'> {  /** The columns, in their order. The order is not the reader's to change. */  columns: C[]  items: T[]  /** The arrangement: each column's value and the values of its items, in order. */  value?: KanbanValue  defaultValue?: KanbanValue  onValueChange?: (value: KanbanValue) => void  /** What an item shows, with the attributes of its handle and of its move button to spread. Each button holds its icon. */  children: (item: T, controls: KanbanControls) => ReactNode  /** What stands beside a column's title, such as the number of items it holds. */  header?: (column: C, items: T[]) => ReactNode  /** What a column says while it holds no item. */  empty?: (column: C) => ReactNode  /** The names of the controls, in the page's language. */  labels?: KanbanLabels<T>  /** What the status region says, in the page's language. */  messages?: KanbanMessages}/** * A board whose items the reader moves between columns. React writes the columns and their items in the * arrangement it holds; the behavior carries an item with the pointer and the keys, and asks React to arrange * the board when one is dropped. An item that changes column is rendered again in its new list, so what it * shows comes from the data, not from state kept inside it. */export function Kanban<C extends KanbanColumn, T extends KanbanItem>({ columns, items, value, defaultValue, onValueChange, children, header, empty, labels = {}, messages, className, ...root }: KanbanProps<C, T>) {  const id = useId()  const [kept, setKept] = useState(() => value ?? defaultValue)  const shown = arranged(columns, items, value ?? kept)  // A move waits for the render that writes the item in its place, so focus finds its handle there. Every  // arrangement asked for is kept, which renders even when the owner does not take it: the wait always ends.  const waiting = useRef<(() => void)[]>([])  useLayoutEffect(() => {    waiting.current.splice(0).forEach(done => done())  })  const arrange = (next: KanbanValue) => new Promise<void>((done) => {    waiting.current.push(done)    setKept(next)    onValueChange?.(next)  })  const ref = useBehavior(kanban, { messages, arrange })  const { drag = (item: T) => `Drag ${item.label}`, move = (item: T) => `Move ${item.label}`, column: columnLabel = 'Column', position = 'Position', confirm = 'Move', cancel = 'Cancel' } = labels  return (    <div className={className ? `kanban ${className}` : 'kanban'} role="group" ref={ref} {...root}>      {columns.map((column, at) => (        <section className="kanban-column" data-value={column.value} aria-labelledby={`${id}-column-${at}`} key={column.value}>          <header className="kanban-header">            <h3 className="kanban-title" id={`${id}-column-${at}`}>{column.label}</h3>            {header?.(column, shown[at]!)}          </header>          <ol className="kanban-items">            {shown[at]!.map(item => (              <li className="kanban-item" data-value={item.value} key={item.value}>                {children(item, {                  handle: { 'type': 'button', 'className': 'kanban-handle', 'aria-pressed': 'false', 'aria-label': drag(item) },                  move: { 'type': 'button', 'className': 'kanban-move', 'popoverTarget': `${id}-mover`, 'aria-label': move(item) },                })}              </li>            ))}          </ol>          <p className="kanban-empty">{empty ? empty(column) : 'No items'}</p>        </section>      ))}      <div className="popover popover-end" popover="auto" id={`${id}-mover`}>        <form className="kanban-mover">          <label className="field">            {columnLabel}            <select className="select" name="column" />          </label>          <label className="field">            {position}            <select className="select" name="position" />          </label>          <div className="kanban-mover-actions">            <button type="button" className="btn btn-sm" popoverTarget={`${id}-mover`} popoverTargetAction="hide">{cancel}</button>            <button type="submit" className="btn btn-sm btn-primary">{confirm}</button>          </div>        </form>      </div>      <div className="kanban-preview" popover="manual" aria-hidden="true" />      <p className="kanban-status" role="status" />    </div>  )}/** * The items of each column, in the order an arrangement gives them. An item it does not name keeps the column * it names itself, or the first, after the ones it does; a value it names that no item has is passed over. */function arranged<C extends KanbanColumn, T extends KanbanItem>(columns: C[], items: T[], order: KanbanValue = []): T[][] {  const named = new Set(order.flatMap(entry => entry.items))  const own = (item: T) => columns.some(column => column.value === item.column) ? item.column : columns[0]?.value  return columns.map((column) => {    const listed = (order.find(entry => entry.value === column.value)?.items ?? []).flatMap(value => items.filter(item => item.value === value))    return [...listed, ...items.filter(item => !named.has(item.value) && own(item) === column.value)]  })}
ui/Kanban.svelte
<script lang="ts" module>  import type { Snippet } from 'svelte'  import type { HTMLAttributes, HTMLButtonAttributes } from 'svelte/elements'  import type { KanbanMessages, KanbanValue } from '@master/ui/behaviors/kanban.js'  export type { KanbanValue }  export interface KanbanColumn {    /** What the column stands for in the arrangement. */    value: string    /** The column's name: its title, and what the status and the mover call it. */    label: string  }  export interface KanbanItem {    /** What the item stands for in the arrangement. No other item has it. */    value: string    /** What the item is called: its handle and its move button are named with it. */    label: string    /** The column the item starts in, and stays in while the arrangement does not name it. The first by default. */    column?: string  }  export interface KanbanLabels<T extends KanbanItem> {    /** The accessible name of an item's handle. `Drag <label>` by default. */    drag?: (item: T) => string    /** The accessible name of the button that opens the mover for an item. `Move <label>` by default. */    move?: (item: T) => string    /** The mover's two fields and two buttons. */    column?: string    position?: string    confirm?: string    cancel?: string  }  /** What an item's own markup spreads on its two buttons. */  export interface KanbanControls {    /** For the grip, an empty `<button>`: it carries the item with the pointer and the keys. */    handle: HTMLButtonAttributes    /** For the button that opens the mover, an empty `<button>`: a column and a position are chosen there. */    move: HTMLButtonAttributes  }  export interface KanbanProps<C extends KanbanColumn, T extends KanbanItem> extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {    /** The columns, in their order. The order is not the reader's to change. */    columns: C[]    items: T[]    /** The arrangement: each column's value and the values of its items, in order. Bind it, or leave it out. */    value?: KanbanValue    onValueChange?: (value: KanbanValue) => void    /** What an item shows, with the attributes of its handle and of its move button to spread. Each button holds its icon. */    children: Snippet<[T, KanbanControls]>    /** What stands beside a column's title, such as the number of items it holds. */    header?: Snippet<[C, T[]]>    /** What a column says while it holds no item. */    empty?: Snippet<[C]>    /** The names of the controls, in the page's language. */    labels?: KanbanLabels<T>    /** What the status region says, in the page's language. */    messages?: KanbanMessages  }  /**   * The items of each column, in the order an arrangement gives them. An item it does not name keeps the   * column it names itself, or the first, after the ones it does; a value no item has is passed over.   */  function arranged<C extends KanbanColumn, T extends KanbanItem>(columns: C[], items: T[], order: KanbanValue = []): T[][] {    const named = new Set(order.flatMap(entry => entry.items))    const own = (item: T) => columns.some(column => column.value === item.column) ? item.column : columns[0]?.value    return columns.map((column) => {      const listed = (order.find(entry => entry.value === column.value)?.items ?? []).flatMap(value => items.filter(item => item.value === value))      return [...listed, ...items.filter(item => !named.has(item.value) && own(item) === column.value)]    })  }</script><script lang="ts" generics="C extends KanbanColumn, T extends KanbanItem">  import { tick, untrack } from 'svelte'  import { kanban } from '@master/ui/behaviors/kanban.js'  import { behavior } from './behavior.svelte.js'  const id = $props.id()  let { columns, items, value = $bindable(), onValueChange, children, header, empty, labels = {}, messages, class: className, ...root }: KanbanProps<C, T> = $props()  let kept = $state(untrack(() => value))  const shown = $derived(arranged(columns, items, value ?? kept))  const drag = $derived(labels.drag ?? ((item: T) => `Drag ${item.label}`))  const move = $derived(labels.move ?? ((item: T) => `Move ${item.label}`))  // A move waits for the render that writes the item in its place, so focus finds its handle there.  const arrange = async (next: KanbanValue) => {    kept = next    value = next    onValueChange?.(next)    await tick()  }  const attach = behavior(kanban, () => ({ messages, arrange }))</script><!--  @component  A board whose items the reader moves between columns. Svelte writes the columns and their items in the  arrangement it holds; the behavior carries an item with the pointer and the keys, and asks Svelte to arrange  the board when one is dropped. An item that changes column is rendered again in its new list, so what it  shows comes from the data, not from state kept inside it.--><div class={['kanban', className]} role="group" {@attach attach} {...root}>  {#each columns as column, at (column.value)}    <section class="kanban-column" data-value={column.value} aria-labelledby="{id}-column-{at}">      <header class="kanban-header">        <h3 class="kanban-title" id="{id}-column-{at}">{column.label}</h3>        {@render header?.(column, shown[at]!)}      </header>      <ol class="kanban-items">        {#each shown[at]! as item (item.value)}          <li class="kanban-item" data-value={item.value}>            {@render children(item, {              handle: { 'type': 'button', 'class': 'kanban-handle', 'aria-pressed': 'false', 'aria-label': drag(item) },              move: { 'type': 'button', 'class': 'kanban-move', 'popovertarget': `${id}-mover`, 'aria-label': move(item) },            })}          </li>        {/each}      </ol>      <p class="kanban-empty">{#if empty}{@render empty(column)}{:else}No items{/if}</p>    </section>  {/each}  <div class="popover popover-end" popover="auto" id="{id}-mover">    <form class="kanban-mover">      <label class="field">        {labels.column ?? 'Column'}        <select class="select" name="column"></select>      </label>      <label class="field">        {labels.position ?? 'Position'}        <select class="select" name="position"></select>      </label>      <div class="kanban-mover-actions">        <button type="button" class="btn btn-sm" popovertarget="{id}-mover" popovertargetaction="hide">{labels.cancel ?? 'Cancel'}</button>        <button type="submit" class="btn btn-sm btn-primary">{labels.confirm ?? 'Move'}</button>      </div>    </form>  </div>  <div class="kanban-preview" popover="manual" aria-hidden="true"></div>  <p class="kanban-status" role="status"></p></div>
ui/Kanban.vue
<script setup lang="ts" generic="C extends { value: string, label: string }, T extends { value: string, label: string, column?: string }">import { computed, nextTick, ref, useId, useTemplateRef } from 'vue'import { kanban, type KanbanMessages, type KanbanValue } from '@master/ui/behaviors/kanban.js'import { useBehavior } from './use-behavior'defineOptions({ inheritAttrs: false })const { columns, items, labels = {}, messages } = defineProps<{  /** The columns, in their order, each with the value it stands for and its name. The order is not the reader's to change. */  columns: C[]  /**   * Each with the value it stands for, which no other item has, the label its controls are named with, and   * the column it starts in: the first by default.   */  items: T[]  /**   * The names of the controls, in the page's language: `drag` and `move` name an item's handle and the   * button that opens the mover, `Drag <label>` and `Move <label>` by default; the others are the mover's   * two fields and two buttons.   */  labels?: { drag?: (item: T) => string, move?: (item: T) => string, column?: string, position?: string, confirm?: string, cancel?: string }  /** What the status region says, in the page's language. */  messages?: KanbanMessages}>()/** The arrangement, each column's value and the values of its items in order: `v-model`. */const model = defineModel<KanbanValue>()defineSlots<{  /**   * What an item shows. Bind `handle` on the grip, an empty button that carries the item with the pointer and   * the keys, and `move` on another, which opens the mover.   */  default?: (props: { item: T, handle: { 'type': 'button', 'class': string, 'aria-pressed': 'false', 'aria-label': string }, move: { 'type': 'button', 'class': string, 'popovertarget': string, 'aria-label': string } }) => unknown  /** What stands beside a column's title, such as the number of items it holds. */  header?: (props: { column: C, items: T[] }) => unknown  /** What a column says while it holds no item. */  empty?: (props: { column: C }) => unknown}>()/* * A board whose items the reader moves between columns. Vue writes the columns and their items in the * arrangement it holds; the behavior carries an item with the pointer and the keys, and asks Vue to arrange * the board when one is dropped. An item that changes column is rendered again in its new list, so what it * shows comes from the data, not from state kept inside it. */const id = useId()const kept = ref<KanbanValue | undefined>(model.value)const order = computed(() => model.value ?? kept.value ?? [])/** * The items of each column, in the order the arrangement gives them. An item it does not name keeps the * column it names itself, or the first, after the ones it does; a value no item has is passed over. */const shown = computed(() => {  const named = new Set(order.value.flatMap(entry => entry.items))  const own = (item: T) => columns.some(column => column.value === item.column) ? item.column : columns[0]?.value  return columns.map((column) => {    const listed = (order.value.find(entry => entry.value === column.value)?.items ?? []).flatMap(value => items.filter(item => item.value === value))    return [...listed, ...items.filter(item => !named.has(item.value) && own(item) === column.value)]  })})const drag = (item: T) => labels.drag?.(item) ?? `Drag ${item.label}`const move = (item: T) => labels.move?.(item) ?? `Move ${item.label}`// A move waits for the render that writes the item in its place, so focus finds its handle there.const arrange = async (next: KanbanValue) => {  kept.value = next  model.value = next  await nextTick()}const root = useTemplateRef<HTMLDivElement>('root')useBehavior(root, kanban, () => ({ messages, arrange }))</script><template>  <div class="kanban" role="group" ref="root" v-bind="$attrs">    <section v-for="(column, at) in columns" :key="column.value" class="kanban-column" :data-value="column.value" :aria-labelledby="`${id}-column-${at}`">      <header class="kanban-header">        <h3 class="kanban-title" :id="`${id}-column-${at}`">{{ column.label }}</h3>        <slot name="header" :column="column" :items="shown[at]!" />      </header>      <ol class="kanban-items">        <li v-for="item in shown[at]" :key="item.value" class="kanban-item" :data-value="item.value">          <slot            :item="item"            :handle="{ 'type': 'button', 'class': 'kanban-handle', 'aria-pressed': 'false', 'aria-label': drag(item) }"            :move="{ 'type': 'button', 'class': 'kanban-move', 'popovertarget': `${id}-mover`, 'aria-label': move(item) }"          />        </li>      </ol>      <p class="kanban-empty"><slot name="empty" :column="column">No items</slot></p>    </section>    <div class="popover popover-end" popover="auto" :id="`${id}-mover`">      <form class="kanban-mover">        <label class="field">          {{ labels.column ?? 'Column' }}          <select class="select" name="column" />        </label>        <label class="field">          {{ labels.position ?? 'Position' }}          <select class="select" name="position" />        </label>        <div class="kanban-mover-actions">          <button type="button" class="btn btn-sm" :popovertarget="`${id}-mover`" popovertargetaction="hide">{{ labels.cancel ?? 'Cancel' }}</button>          <button type="submit" class="btn btn-sm btn-primary">{{ labels.confirm ?? 'Move' }}</button>        </div>      </form>    </div>    <div class="kanban-preview" popover="manual" aria-hidden="true" />    <p class="kanban-status" role="status" />  </div></template>

#클래스

클래스설명
kanban보드입니다. 가로로 스크롤되는 열의 행입니다. 높이를 지정하면 열이 그 높이에서 멈추고 각 목록이 독립적으로 스크롤됩니다. 항목을 옮기는 동안 커서가 주먹 쥔 손 모양으로 바뀝니다.
kanban-column열입니다. 제목으로 이름을 지정한 트레이이며 data-value 값을 나타냅니다. hidden이 있으면 항목을 받지 않고 건너뜁니다.
kanban-header열의 머리 부분으로, 제목과 개수처럼 그 옆에 놓이는 요소를 담습니다. 목록이 스크롤되는 동안 제자리에 남습니다.
kanban-title열의 이름입니다. 항목의 텍스트가 시작하는 선에 맞춰 놓입니다.
kanban-items열의 목록으로, 문서 순서를 따릅니다. 열에서 스크롤되는 부분입니다.
kanban-items-target옮기는 항목이 놓일 자리가 목록의 끝일 때 동작이 그 목록에 설정합니다. 마지막 항목 뒤에 선을 그리거나, 빈 열의 오목한 영역 둘레에 링을 그립니다.적용할 클래스는 kanban-items입니다
kanban-item항목입니다. data-value 값을 나타내며, 이 값은 보드의 다른 항목과 겹치지 않습니다. 옮기는 동안에는 제자리에 남아 흐려집니다. 마우스로는 링크, 버튼, 필드가 아닌 어느 부분으로든 옮길 수 있습니다.
kanban-item-target옮기는 항목이 어떤 항목 앞에 놓이게 될 때 동작이 그 항목에 설정합니다. 그 항목 위쪽 간격에 선을 그립니다.적용할 클래스는 kanban-item입니다
kanban-handle항목을 옮기는 버튼으로, 손잡이 아이콘을 넣습니다. 무엇을 옮기는지 이름으로 밝히세요. 조작 영역은 24px이고 터치 화면에서는 높이가 44px이며 옆의 이동 버튼과의 중간까지만 넓어집니다.
kanban-controls항목의 이동 버튼과 핸들을 한 쌍으로 묶어 항목 첫 줄의 끝에 두는 요소입니다. 둘은 가까이 붙어 놓이고, 항목의 패딩 안으로 걸쳐 들어가 손잡이의 글리프가 그 아래 텍스트가 끝나는 가장자리에 맞으며, 높이가 --kanban-line인 줄을 기준으로 세로 가운데에 놓입니다.
kanban-move해당 항목의 이동 폼을 여는 버튼으로, 손잡이와 한 쌍을 이루며, 서로 엇갈리는 화살표 두 개의 아이콘을 넣습니다. 조작 영역은 24px이고 터치 화면에서는 높이가 44px이며 손잡이와의 중간까지만 넓어집니다. popovertarget으로 이동 폼의 팝오버를 지정하고, 무엇을 옮기는지 이름으로 밝히세요. 포인터를 올릴 수 있는 기기에서는 포인터나 키보드가 해당 항목에 닿은 뒤에 그립니다.
kanban-empty얕은 오목한 영역 안의 짧은 문구입니다. 열에 항목이 없는 동안 목록 대신 표시됩니다.
kanban-preview동작이 드래그하는 동안 최상위 레이어에서 포인터 위치에 표시하는 빈 요소로, 옮기는 항목의 이름을 담습니다.
kanban-preview-landing포인터를 놓은 뒤 시트가 항목이 들어간 자리로 미끄러지듯 이동하는 동안 동작이 설정합니다.적용할 클래스는 kanban-preview입니다
kanban-mover보드 안에 있는 팝오버의 폼입니다. 이름이 column인 select와 이름이 position인 select가 있으며, 동작이 이 둘을 채웁니다. 항목 안의 버튼 가운데 popovertarget이 그 팝오버인 버튼, 즉 kanban-move나 페이지가 직접 만든 버튼이 해당 항목에 대한 폼을 열고, 폼을 제출하면 항목이 이동합니다. 동작은 해당 버튼의 이름을 폼의 aria-label로 지정하여 어떤 항목을 이동하는지 알립니다.
kanban-mover-actions이동 폼 끝에 놓이는 버튼들입니다. 폼을 닫는 버튼이 먼저, 이동하는 버튼이 그다음에 옵니다.
kanban-status집어 들기, 자리 선택, 놓기, 취소를 각각 안내하는 영역으로, 보드 안이나 바로 뒤에 둡니다. 공간을 차지하지 않습니다.

#사용자 지정 속성

속성기본값설명
--kanban-column-width17.5rem열의 너비입니다. 보드 너비에서 2rem을 뺀 값을 넘지 않습니다.
--kanban-gap.75rem두 열 사이의 간격
--kanban-inset.375rem열의 가장자리와 항목 사이의 여백입니다. 열의 모서리 반경은 항목의 모서리 반경에 이 값을 더한 값입니다.
--kanban-item-gap.375rem두 항목 사이의 간격으로, 자리를 표시하는 선이 여기에 놓입니다.
--kanban-padding.75rem보드에 담긴 카드의 패딩입니다. 열의 제목도 같은 선에서 시작합니다.
--kanban-radiusvar(--radius-control-lg)보드에 담긴 카드, 빈 열의 오목한 영역, 옮기는 시트의 모서리 반경
--kanban-markervar(--color-focus)자리를 표시하는 선과 빈 열 둘레에 그리는 링의 색
--kanban-linecalc(.9375rem * 1.4)컨트롤 한 쌍이 세로 가운데로 정렬되는 줄의 높이입니다. 기본값은 카드 제목의 줄 높이입니다.kanban-controls에 설정합니다
--kanban-x뷰포트 왼쪽을 기준으로 한 옮기는 시트의 시작 가장자리 위치이며, 스크립트가 값을 기록합니다.kanban-preview에 설정합니다
--kanban-y뷰포트 위쪽을 기준으로 한 옮기는 시트의 위쪽 가장자리 위치이며, 스크립트가 값을 기록합니다.kanban-preview에 설정합니다
--kanban-width옮기는 시트의 너비로, 옮기는 항목의 너비와 같습니다. 스크립트가 값을 기록합니다.kanban-preview에 설정합니다

#소스

@master/ui/components/kanban.css
/* * Kanban: a board of columns, each a named section that holds a list of items, where an item is moved to * another place in its column or into another column: by dragging its handle, with the keys, or by choosing a * column and a position in the mover. * The board is a row that scrolls across; a column is a tray as wide as --kanban-column-width, never wider than * the board less a peek of the next, and its list scrolls by itself once the column is as tall as the board. * A column's corner is the corner of what it holds plus its inset, and its title starts on the line the * items' words start on. What an item holds is the page's: a card, a badge, an avatar. * Nothing moves while an item is carried. The item stays in its place and fades, a line stands in the gap it * would land in, kanban-item-target before an item or kanban-items-target at the end of a list, and a small * sheet with the item's name follows the pointer in the top layer, clear of every column's clipping, placed * by --kanban-x and --kanban-y at the width --kanban-width. Those three are the only things the behavior * measures and writes. On the release the sheet glides into the place the item took and leaves. * Without the popover API there is no sheet: the faded item and the line still say what is carried and where. */@layer components.ui {  .kanban {    --kanban-column-width: 17.5rem;    --kanban-gap: .75rem;    --kanban-inset: .375rem;    --kanban-item-gap: .375rem;    --kanban-padding: .75rem;    --kanban-radius: var(--radius-control-lg);    --kanban-marker: var(--color-focus);    position: relative;    display: flex;    align-items: flex-start;    gap: var(--kanban-gap);    min-width: 0;    min-height: 0;    overflow-x: auto;    overscroll-behavior-x: contain;    scrollbar-width: thin;    scrollbar-color: var(--color-line-strong) transparent;    /* While an item is carried the cursor is a closed hand wherever the pointer goes, and no text is selected. */    &:has(.kanban-handle[aria-pressed="true"]) {      cursor: grabbing;      user-select: none;      -webkit-user-select: none;    }    /* A card the board holds takes the board's corner and padding, so the column's corner and title follow it. */    .card {      --card-radius: var(--kanban-radius);      --card-padding: var(--kanban-padding);    }    @media (forced-colors: active) {      scrollbar-color: auto;    }  }  /* A column: a tray that holds its header and its list, as tall as what it holds and never taller than the board. */  .kanban-column {    --surface-color: var(--color-surface-tray);    display: flex;    flex: none;    flex-direction: column;    width: min(var(--kanban-column-width), 100% - 2rem);    min-width: 0;    max-height: 100%;    border-radius: calc(var(--kanban-radius) * var(--corner-scale) + var(--kanban-inset));    corner-shape: var(--corner-shape);    background: var(--color-surface-tray);    color: var(--color-text-body);    box-shadow: inset 0 0 0 .5px var(--color-line-hair), inset 0 1px 2px -1px var(--color-shade-2);    &[hidden] {      display: none;    }    @media (forced-colors: active) {      outline: 1px solid CanvasText;      outline-offset: -1px;    }  }  /* The head of a column stays while its list scrolls. Its words start where the items' words start. */  .kanban-header {    display: flex;    flex: none;    align-items: center;    gap: .5rem;    min-height: 2.5rem;    padding: .375rem calc(var(--kanban-inset) + var(--kanban-padding)) .125rem;  }  .kanban-title {    flex: 1;    min-width: 0;    margin: 0;    color: var(--color-text-strong);    font-size: .8125rem;    font-weight: var(--font-weight-control);    line-height: 1.4;    overflow-wrap: break-word;  }  /* The list. It is the one part of a column that scrolls, and it keeps room for the line of a place at its ends. */  .kanban-items {    display: flex;    flex: 1 1 auto;    flex-direction: column;    gap: var(--kanban-item-gap);    min-height: 0;    margin: 0;    padding: var(--kanban-item-gap) var(--kanban-inset) var(--kanban-inset);    overflow-y: auto;    /* Its end does not move the page under it; a swipe or a wheel across still reaches the board, which scrolls that way. */    overscroll-behavior-y: contain;    list-style: none;    scrollbar-width: thin;    scrollbar-color: var(--color-line-strong) transparent;    @media (forced-colors: active) {      scrollbar-color: auto;    }  }  .kanban-item {    position: relative;    flex: none;    min-width: 0;    margin: 0;    padding: 0;    scroll-margin: var(--kanban-inset);    transition-property: opacity;    transition-duration: var(--duration-quick);    transition-timing-function: var(--easing-glide);    /* Carried: it keeps its place and fades, so the reader sees where it came from. */    &:has(.kanban-handle[aria-pressed="true"]) {      opacity: .45;    }    /* Held by the keys, its handle has focus: it fades less, so the ring around the grip stays plain. */    &:has(.kanban-handle[aria-pressed="true"]:focus) {      opacity: .7;    }    /* The place before this item: a line in the middle of the gap over it. */    &.kanban-item-target::before {      content: '';      position: absolute;      inset-inline: 0;      top: calc(var(--kanban-item-gap) / -2 - 1px);      height: 2px;      border-radius: 1px;      background: var(--kanban-marker);      pointer-events: none;    }    @media (prefers-reduced-motion: reduce) {      transition-property: none;    }    @media (forced-colors: active) {      &.kanban-item-target::before {        background: Highlight;      }    }  }  /* An empty list with no well to show keeps its room, and the line of a place is drawn across the middle of it. */  .kanban-items-target:not(:has(.kanban-item)) {    background: linear-gradient(var(--kanban-marker), var(--kanban-marker)) center / calc(100% - var(--kanban-inset) * 2) 2px no-repeat;    @media (forced-colors: active) {      background-image: linear-gradient(Highlight, Highlight);    }  }  /*   * An item is carried by any part of it with a mouse, and says so with the hand where a pointer hovers; a   * link, a button or a field in it keeps its own cursor and its own press.   */  @media (hover: hover) and (pointer: fine) {    .kanban-item:has(.kanban-handle:enabled) {      cursor: grab;    }  }  /*   * A move is drawn by the platform where it can be: the behavior starts a view transition scoped to the board,   * each item is named by its own node, and every item glides from where it stood to where it stands. A list is   * named too and holds its items' pictures, clipped as the list clips them: an item past the foot of a long   * column, or scrolled under its head, stays out of sight on the way. An item that changes column is drawn by   * the list it arrives in, so it comes in from that list's edge while the carried sheet crosses the gap. The   * names stay inside the board, so a page's own transitions take the board as one picture.   */  @supports (view-transition-scope: all) {    .kanban {      view-transition-scope: all;    }    .kanban-items {      view-transition-name: match-element;      view-transition-class: kanban-items;      view-transition-group: contain;    }    .kanban-item {      view-transition-name: match-element;      view-transition-class: kanban-item;    }    /*     * The board takes no press while the pictures glide, so the glide is quick, the board's own picture with     * it: a reader who drops one card and reaches for the next finds it answering.     */    .kanban::view-transition-group(*),    .kanban::view-transition-old(*),    .kanban::view-transition-new(*) {      animation-duration: var(--duration-quick);      animation-timing-function: var(--easing-glide);    }    .kanban::view-transition-group-children(.kanban-items) {      overflow: clip;    }  }  /*   * The place at the end of a list: a line under its last item, in the middle of the gap the item would leave   * there. It is drawn by that item, out of flow as the line over an item is, so marking a place never changes   * how far the list scrolls: a line that was an item of the list made it 2px longer and moved every item.   */  .kanban-items-target .kanban-item:nth-last-child(1 of .kanban-item)::after {    content: '';    position: absolute;    inset-inline: 0;    bottom: calc(var(--kanban-item-gap) / -2 - 1px);    height: 2px;    border-radius: 1px;    background: var(--kanban-marker);    pointer-events: none;    @media (forced-colors: active) {      background: Highlight;    }  }  /*   * What an empty column shows: a shallow well with a few words, in place of its list. A column that is the   * place an item would land in has no gap to draw a line in, so the well takes the marker's ink as a ring.   */  .kanban-empty {    display: none;    place-items: center;    min-height: 3.5rem;    margin: var(--kanban-item-gap) var(--kanban-inset) var(--kanban-inset);    padding: .5rem var(--kanban-padding);    border-radius: calc(var(--kanban-radius) * var(--corner-scale));    corner-shape: var(--corner-shape);    background: var(--color-surface-inset);    color: var(--color-text-muted);    box-shadow: inset 0 0 0 .5px var(--color-line-hair);    font-size: .8125rem;    line-height: 1.4;    text-align: center;  }  .kanban-column:not(:has(.kanban-item)):has(.kanban-empty) {    .kanban-items {      display: none;    }    .kanban-empty {      display: grid;    }    &:has(.kanban-items-target) .kanban-empty {      color: var(--color-text-strong);      box-shadow: inset 0 0 0 1.5px var(--kanban-marker);      @media (forced-colors: active) {        outline: 2px solid Highlight;        outline-offset: -2px;      }    }  }  /*   * An item's two controls, a quiet pair of the same size: the handle, which carries the item, and the button   * that opens the mover. Each holds its icon, a grip and two arrows that pass, at 14px; each is 24px and shows   * only that icon until the pointer or the keys reach it, and its target is 44px tall on touch without moving it.   */  .kanban-handle,  .kanban-move {    --icon-size: .875rem;    position: relative;    display: inline-grid;    flex: none;    place-items: center;    width: 1.5rem;    height: 1.5rem;    margin: 0;    padding: 0;    border: 0;    border-radius: calc(var(--radius-chip) * var(--corner-scale));    corner-shape: var(--corner-shape);    background: transparent;    color: var(--color-text-muted);    appearance: none;    user-select: none;    -webkit-user-select: none;    -webkit-tap-highlight-color: transparent;    transition-property: background-color, color;    transition-duration: var(--duration-quick);    transition-timing-function: var(--easing-glide);    &::after {      content: '';      position: absolute;      inset: -.25rem;      @media (pointer: coarse) {        inset: min(-.25rem, calc((100% - 2.75rem) / 2));      }    }    @media (hover: hover) {      &:hover:not(:disabled) {        background: var(--color-surface-chip);        color: var(--color-text-strong);      }    }    &:focus-visible {      @apply --focus-ring;      outline-offset: 0;      color: var(--color-text-strong);    }    &:disabled {      color: var(--color-text-disabled);      cursor: not-allowed;    }  }  /*   * The pair at the end of an item's first line. The two stand close; the pair reaches into the item's padding   * by .5rem, as far as the grip's points stand in from its box, so the points meet the edge the words under   * them end on and only a hover chip shows past it; and it centers on a line of --kanban-line, a card title's   * by default, so it stands beside the first line and does not deepen it.   */  .kanban-controls {    --kanban-line: calc(.9375rem * 1.4);    display: inline-flex;    flex: none;    align-items: center;    gap: .125rem;    margin-block: calc((var(--kanban-line) - 1.5rem) / 2);    margin-inline-end: -.5rem;  }  /*   * The two stand .125rem apart, so on the side where they meet each target stops halfway: a target that reached   * its full depth there lay over the other button, and a press on the edge of one answered as the other.   */  .kanban-controls:has(.kanban-handle) .kanban-move::after {    inset-inline-end: -.0625rem;  }  .kanban-controls:has(.kanban-move) .kanban-handle::after {    inset-inline-start: -.0625rem;  }  @media (hover: hover) and (pointer: fine) {    .kanban-item:hover .kanban-move,    .kanban-item:focus-within .kanban-move {      opacity: 1;    }  }  .kanban-handle {    cursor: grab;    /* A drag that starts on the grip never scrolls; the rest of the item still does. */    touch-action: none;    /* Carried: the grip sits in a well, as a pressed button does. */    &[aria-pressed="true"] {      background: var(--color-surface-inset);      color: var(--color-text-strong);      box-shadow: var(--shadow-pressed);      cursor: grabbing;    }  }  .kanban-move {    cursor: pointer;    touch-action: manipulation;    /*     * Where a pointer hovers, the way to move without a drag waits out of sight until the pointer or the keys     * are on its item: a board of cards then shows one grip to a card, not a pair. A finger has no hover, so on     * a touch screen it is always drawn.     */    @media (hover: hover) and (pointer: fine) {      opacity: 0;      transition-property: background-color, color, opacity;      @media (prefers-reduced-motion: reduce) {        transition-property: background-color, color;      }    }  }  /*   * The carried item's name on a small raised sheet, in the top layer, where no column clips it. It is a manual   * popover the behavior shows; it stands at the viewport's corner and --kanban-x and --kanban-y carry it to the   * pointer, with no easing between the two. Landing, it glides to the place the item took, then leaves.   */  .kanban-preview {    display: none;    position: fixed;    inset: 0 auto auto 0;    box-sizing: border-box;    width: var(--kanban-width, 16rem);    max-width: calc(100vw - 1rem);    margin: 0;    /*     * The room under the words is a clear border, not padding: the clamp cuts at the padding's edge, and an     * engine that still paints the line after the last showed the top of it in padding there.     */    padding: .625rem var(--kanban-padding, .75rem) 0;    border: 0;    border-block-end: .625rem solid transparent;    border-radius: calc(var(--kanban-radius, var(--radius-control-lg)) * var(--corner-scale));    corner-shape: var(--corner-shape);    overflow: hidden;    @apply --surface-sheet;    color: var(--color-text-strong);    box-shadow: var(--shadow-floating);    font-size: .875rem;    font-weight: var(--font-weight-control);    line-height: 1.4;    translate: var(--kanban-x, 0px) var(--kanban-y, 0px);    pointer-events: none;    user-select: none;    -webkit-user-select: none;    will-change: translate;    @supports selector(:popover-open) {      opacity: 0;      transition-property: opacity, overlay, display;      transition-duration: var(--duration-quick);      transition-timing-function: var(--easing-glide);      transition-behavior: allow-discrete;      &:popover-open {        display: -webkit-box;        opacity: 1;        -webkit-box-orient: vertical;        -webkit-line-clamp: 2;        @starting-style {          opacity: 0;        }      }    }    &.kanban-preview-landing {      transition-property: translate, opacity, overlay, display;      transition-duration: var(--duration-base), var(--duration-quick), var(--duration-quick), var(--duration-quick);    }    @media (prefers-reduced-motion: reduce) {      &.kanban-preview-landing {        transition-property: opacity, overlay, display;      }    }    @media (forced-colors: active) {      outline: 2px solid Highlight;      outline-offset: -2px;    }  }  /* The mover: the form of a popover where a column and a position are chosen, for a hand that does not drag. */  .kanban-mover {    display: grid;    gap: .75rem;    width: 15rem;    max-width: 100%;    margin: 0;  }  /* The mover's buttons stand at its end, the one that moves last. */  .kanban-mover-actions {    display: flex;    flex-wrap: wrap;    justify-content: flex-end;    gap: .5rem;  }  /* What the status region says is for assistive technology: it takes no room. */  .kanban-status {    position: absolute;    width: 1px;    height: 1px;    margin: -1px;    padding: 0;    overflow: hidden;    clip-path: inset(50%);    white-space: nowrap;  }}