탐색

v2.1.0
애플리케이션 블록

빈 상태 블록

표시할 내용이 없을 때 뷰에 무엇을 보여 주고 어떻게 시작을 안내하는지 설명합니다.

빈 상태는 뷰에 표시할 내용이 생기기 전에 보여 주는 화면입니다. 상황에 맞는 문구를 담은 빈 상태 컴포넌트 하나로 이루어진 가장 작은 블록입니다. 이 블록에서는 문구가 가장 중요합니다. 여기에 어떤 내용이 들어오는지, 왜 비어 있는지, 다음에 무엇을 하면 되는지 알려 주세요.

빈 상태

<section class="sheet container-inline" aria-labelledby="es-title">  <div class="empty">    <div class="icon-frame empty-media" aria-hidden="true">      <svg class="icon" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">        <path d="M2.5 15.25L2.5 5.25A1.25 1.25 0 0 1 3.75 4L7.9822 4A1.25 1.25 0 0 1 8.8661 4.3661L10.1339 5.6339A1.25 1.25 0 0 0 11.0178 6L16.25 6A1.25 1.25 0 0 1 17.5 7.25L17.5 15.25A1.25 1.25 0 0 1 16.25 16.5L3.75 16.5A1.25 1.25 0 0 1 2.5 15.25Z" />      </svg>    </div>    <h2 class="empty-title" id="es-title">No projects yet</h2>    <p class="empty-description">      A project connects a repository to an address. Create one, and every push becomes a deployment.    </p>    <div class="empty-actions">      <a class="btn btn-sm" href="#">Read the guide</a>      <button type="button" class="btn btn-sm btn-primary">        <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="M3 8L13 8" /><path d="M8 3L8 13" />        </svg>New project      </button>    </div>  </div></section>
import FolderIcon from '@master/icons-react/native/20/soft/folder'import PlusIcon from '@master/icons-react/native/16/soft/plus'<section className="sheet container-inline" aria-labelledby="es-title">  <div className="empty">    <div className="icon-frame empty-media" aria-hidden="true"><FolderIcon className="icon" /></div>    <h2 className="empty-title" id="es-title">No projects yet</h2>    <p className="empty-description">      A project connects a repository to an address. Create one, and every push becomes a deployment.    </p>    <div className="empty-actions">      <a className="btn btn-sm" href="#">Read the guide</a>      <button type="button" className="btn btn-sm btn-primary">        <PlusIcon className="icon" />New project      </button>    </div>  </div></section>
<script>  import FolderIcon from '@master/icons-svelte/native/20/soft/folder'  import PlusIcon from '@master/icons-svelte/native/16/soft/plus'</script><section class="sheet container-inline" aria-labelledby="es-title">  <div class="empty">    <div class="icon-frame empty-media" aria-hidden="true"><FolderIcon class="icon" /></div>    <h2 class="empty-title" id="es-title">No projects yet</h2>    <p class="empty-description">      A project connects a repository to an address. Create one, and every push becomes a deployment.    </p>    <div class="empty-actions">      <a class="btn btn-sm" href="#">Read the guide</a>      <button type="button" class="btn btn-sm btn-primary">        <PlusIcon class="icon" />New project      </button>    </div>  </div></section>
<script setup>import FolderIcon from '@master/icons-vue/native/20/soft/folder'import PlusIcon from '@master/icons-vue/native/16/soft/plus'</script><template>  <section class="sheet container-inline" aria-labelledby="es-title">    <div class="empty">      <div class="icon-frame empty-media" aria-hidden="true"><FolderIcon class="icon" /></div>      <h2 class="empty-title" id="es-title">No projects yet</h2>      <p class="empty-description">        A project connects a repository to an address. Create one, and every push becomes a deployment.      </p>      <div class="empty-actions">        <a class="btn btn-sm" href="#">Read the guide</a>        <button type="button" class="btn btn-sm btn-primary">          <PlusIcon class="icon" />New project        </button>      </div>    </div>  </section></template>

블록은 복사해 쓰는 마크업입니다. 페이지의 글자색과 글자 크기를 따르며, 미리보기에서는 본문에 fg-text-body text-sm을 설정합니다. 각 블록은 크기 컨테이너이므로 넓은 페이지, 사이드바 정도의 공간, 대화 상자 등에서 블록 자체의 너비에 맞춰 레이아웃이 바뀝니다.

#빈 상태의 네 가지 유형

뷰가 비어 있는 이유는 네 가지이며, 이유에 따라 안내 문구도 달라집니다.

유형안내 내용제공할 동작
아직 항목 없음여기에 표시되는 항목과 그 용도첫 항목을 만드는 동작
첫 사용첫 결과를 얻기까지의 간단한 단계다음 단계
결과 없음검색어와 아직 적용 중인 필터검색 범위를 넓히는 방법
오류 발생무슨 일이 일어났고 어느 쪽에서 문제가 생겼는지 알기 쉬운 말로 설명알림에서 다시 시도하는 방법

위에서 첫 번째 유형을 살펴봤습니다. 나머지 세 유형은 아래에서 다룹니다.

#첫 사용

제품을 처음 연 사용자에게는 빈 뷰 대신 시작 방법을 안내하세요. 단계를 세로로 배치하고 각 단계를 한 문장으로 설명한 뒤, 다음 단계로 넘어가는 동작을 기본 강조 버튼으로 제공합니다. 이미 마친 단계는 완료로 표시하고, 현재 단계는 aria-current="step"으로 표시합니다.

첫 사용

<section class="sheet container-inline flex flex-col gap-lg p-xl max-w(560) mx-auto" aria-labelledby="es-steps-title">  <header class="flex flex-col gap-xs">    <h2 class="heading heading-lg" id="es-steps-title">Deploy your first project</h2>    <p class="m(0) leading-md">Three steps, about two minutes. You can stop after any of them.</p>  </header>  <ol class="steps steps-vertical">    <li class="steps-item">      <div class="steps-body">        <span class="steps-title">Connect a repository</span>        <span class="steps-description">Signed in with GitHub as yiching.</span>      </div>    </li>    <li class="steps-item" aria-current="step">      <div class="steps-body">        <span class="steps-title">Choose what to build</span>        <span class="steps-description">          Pick a repository and a branch. We detect the framework.        </span>      </div>    </li>    <li class="steps-item">      <div class="steps-body">        <span class="steps-title">Go live</span>        <span class="steps-description">Your site gets an address in under a minute.</span>      </div>    </li>  </ol>  <div class="flex flex-wrap gap-xs">    <button type="button" class="btn btn-primary">Choose a repository</button>    <button type="button" class="btn btn-quiet">Deploy an example instead</button>  </div></section>
<section className="sheet container-inline flex flex-col gap-lg p-xl max-w(560) mx-auto" aria-labelledby="es-steps-title">  <header className="flex flex-col gap-xs">    <h2 className="heading heading-lg" id="es-steps-title">Deploy your first project</h2>    <p className="m(0) leading-md">      Three steps, about two minutes. You can stop after any of them.    </p>  </header>  <ol className="steps steps-vertical">    <li className="steps-item">      <div className="steps-body">        <span className="steps-title">Connect a repository</span>        <span className="steps-description">Signed in with GitHub as yiching.</span>      </div>    </li>    <li className="steps-item" aria-current="step">      <div className="steps-body">        <span className="steps-title">Choose what to build</span>        <span className="steps-description">          Pick a repository and a branch. We detect the framework.        </span>      </div>    </li>    <li className="steps-item">      <div className="steps-body">        <span className="steps-title">Go live</span>        <span className="steps-description">Your site gets an address in under a minute.</span>      </div>    </li>  </ol>  <div className="flex flex-wrap gap-xs">    <button type="button" className="btn btn-primary">Choose a repository</button>    <button type="button" className="btn btn-quiet">Deploy an example instead</button>  </div></section>
<section class="sheet container-inline flex flex-col gap-lg p-xl max-w(560) mx-auto" aria-labelledby="es-steps-title">  <header class="flex flex-col gap-xs">    <h2 class="heading heading-lg" id="es-steps-title">Deploy your first project</h2>    <p class="m(0) leading-md">Three steps, about two minutes. You can stop after any of them.</p>  </header>  <ol class="steps steps-vertical">    <li class="steps-item">      <div class="steps-body">        <span class="steps-title">Connect a repository</span>        <span class="steps-description">Signed in with GitHub as yiching.</span>      </div>    </li>    <li class="steps-item" aria-current="step">      <div class="steps-body">        <span class="steps-title">Choose what to build</span>        <span class="steps-description">          Pick a repository and a branch. We detect the framework.        </span>      </div>    </li>    <li class="steps-item">      <div class="steps-body">        <span class="steps-title">Go live</span>        <span class="steps-description">Your site gets an address in under a minute.</span>      </div>    </li>  </ol>  <div class="flex flex-wrap gap-xs">    <button type="button" class="btn btn-primary">Choose a repository</button>    <button type="button" class="btn btn-quiet">Deploy an example instead</button>  </div></section>
<template>  <section class="sheet container-inline flex flex-col gap-lg p-xl max-w(560) mx-auto" aria-labelledby="es-steps-title">    <header class="flex flex-col gap-xs">      <h2 class="heading heading-lg" id="es-steps-title">Deploy your first project</h2>      <p class="m(0) leading-md">Three steps, about two minutes. You can stop after any of them.</p>    </header>    <ol class="steps steps-vertical">      <li class="steps-item">        <div class="steps-body">          <span class="steps-title">Connect a repository</span>          <span class="steps-description">Signed in with GitHub as yiching.</span>        </div>      </li>      <li class="steps-item" aria-current="step">        <div class="steps-body">          <span class="steps-title">Choose what to build</span>          <span class="steps-description">            Pick a repository and a branch. We detect the framework.          </span>        </div>      </li>      <li class="steps-item">        <div class="steps-body">          <span class="steps-title">Go live</span>          <span class="steps-description">Your site gets an address in under a minute.</span>        </div>      </li>    </ol>    <div class="flex flex-wrap gap-xs">      <button type="button" class="btn btn-primary">Choose a repository</button>      <button type="button" class="btn btn-quiet">Deploy an example instead</button>    </div>  </section></template>

#결과 없음

검색이나 필터링 결과가 없으면 오타까지 포함해 입력한 검색어를 그대로 보여 주고, 아직 적용 중인 필터를 알려 주세요. 목록이 비어 있는 이유를 알 수 없으면 사용자는 데이터가 사라졌다고 생각합니다.

결과 없음

<section class="sheet container-inline" aria-live="polite" aria-labelledby="es-none-title">  <div class="empty">    <div class="icon-frame empty-media" aria-hidden="true">      <svg class="icon" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">        <circle cx="8.75" cy="8.75" r="5.75" /><path d="M12.8159 12.8159L17.5 17.5" />      </svg>    </div>    <h2 class="empty-title" id="es-none-title">No projects match “drfit”</h2>    <p class="empty-description">      Check the spelling, or search all workspaces. Filters are still applied: Ready, Tokyo.    </p>    <div class="empty-actions">      <button type="button" class="btn btn-sm">Clear filters</button>      <button type="button" class="btn btn-sm">Search all workspaces</button>    </div>  </div></section>
import SearchIcon from '@master/icons-react/native/20/soft/search'<section className="sheet container-inline" aria-live="polite" aria-labelledby="es-none-title">  <div className="empty">    <div className="icon-frame empty-media" aria-hidden="true"><SearchIcon className="icon" /></div>    <h2 className="empty-title" id="es-none-title">No projects match “drfit”</h2>    <p className="empty-description">      Check the spelling, or search all workspaces. Filters are still applied: Ready, Tokyo.    </p>    <div className="empty-actions">      <button type="button" className="btn btn-sm">Clear filters</button>      <button type="button" className="btn btn-sm">Search all workspaces</button>    </div>  </div></section>
<script>  import SearchIcon from '@master/icons-svelte/native/20/soft/search'</script><section class="sheet container-inline" aria-live="polite" aria-labelledby="es-none-title">  <div class="empty">    <div class="icon-frame empty-media" aria-hidden="true"><SearchIcon class="icon" /></div>    <h2 class="empty-title" id="es-none-title">No projects match “drfit”</h2>    <p class="empty-description">      Check the spelling, or search all workspaces. Filters are still applied: Ready, Tokyo.    </p>    <div class="empty-actions">      <button type="button" class="btn btn-sm">Clear filters</button>      <button type="button" class="btn btn-sm">Search all workspaces</button>    </div>  </div></section>
<script setup>import SearchIcon from '@master/icons-vue/native/20/soft/search'</script><template>  <section class="sheet container-inline" aria-live="polite" aria-labelledby="es-none-title">    <div class="empty">      <div class="icon-frame empty-media" aria-hidden="true"><SearchIcon class="icon" /></div>      <h2 class="empty-title" id="es-none-title">No projects match “drfit”</h2>      <p class="empty-description">        Check the spelling, or search all workspaces. Filters are still applied: Ready, Tokyo.      </p>      <div class="empty-actions">        <button type="button" class="btn btn-sm">Clear filters</button>        <button type="button" class="btn btn-sm">Search all workspaces</button>      </div>    </div>  </section></template>

이 영역에는 aria-live="polite"가 설정되어 있으므로, 결과가 있던 상태에서 결과가 없는 상태로 바뀌면 사용자가 입력을 멈춘 뒤 그 변경을 알립니다.

#오류 발생

오류는 빈 상태와 같은 위치에 표시하지만 별도의 상태로 다룹니다. 알림에서 상태 색과 아이콘으로 문제가 생겼음을 나타내고, 문구로 어떤 문제인지 설명한 뒤, 버튼 하나로 다음 동작을 제공합니다. 사용자의 작업이 안전하게 보존된 경우에는 그 사실을 알려 주세요. 이 섹션에는 오류가 발생한 뷰의 이름을 유지해 사용자가 기존 랜드마크를 계속 찾을 수 있게 합니다.

오류 발생

<section class="container-inline" aria-label="Projects">  <div class="alert alert-danger" role="alert">    <svg class="icon alert-icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">      <circle cx="8" cy="8" r="6" /><circle cx="8" cy="5" r="0.5" fill="currentColor" stroke="none" /><path d="M8 8L8 11" />    </svg>    <div class="alert-body">      <p class="alert-title">We could not load your projects</p>      <p class="alert-description">        The request timed out. Your projects are safe; this is on our side. <a class="link" href="#">Check the status page</a>.      </p>    </div>    <button type="button" class="btn btn-sm">Try again</button>  </div></section>
import InfoCircleIcon from '@master/icons-react/native/16/soft/info-circle'<section className="container-inline" aria-label="Projects">  <div className="alert alert-danger" role="alert">    <InfoCircleIcon className="icon alert-icon" />    <div className="alert-body">      <p className="alert-title">We could not load your projects</p>      <p className="alert-description">        The request timed out. Your projects are safe; this is on our side. <a className="link" href="#">Check the status page</a>.      </p>    </div>    <button type="button" className="btn btn-sm">Try again</button>  </div></section>
<script>  import InfoCircleIcon from '@master/icons-svelte/native/16/soft/info-circle'</script><section class="container-inline" aria-label="Projects">  <div class="alert alert-danger" role="alert">    <InfoCircleIcon class="icon alert-icon" />    <div class="alert-body">      <p class="alert-title">We could not load your projects</p>      <p class="alert-description">        The request timed out. Your projects are safe; this is on our side. <a class="link" href="#">Check the status page</a>.      </p>    </div>    <button type="button" class="btn btn-sm">Try again</button>  </div></section>
<script setup>import InfoCircleIcon from '@master/icons-vue/native/16/soft/info-circle'</script><template>  <section class="container-inline" aria-label="Projects">    <div class="alert alert-danger" role="alert">      <InfoCircleIcon class="icon alert-icon" />      <div class="alert-body">        <p class="alert-title">We could not load your projects</p>        <p class="alert-description">          The request timed out. Your projects are safe; this is on our side. <a class="link" href="#">Check the status page</a>.        </p>      </div>      <button type="button" class="btn btn-sm">Try again</button>    </div>  </section></template>

#접근성

  • 제목에는 대체하는 뷰의 제목과 같은 수준의 헤딩을 사용합니다.
  • 사용자 동작에 반응해 빈 상태가 나타나면 이를 알립니다. 결과가 없을 때는 aria-live="polite", 오류가 발생했을 때는 role="alert"를 사용합니다.
  • 아이콘은 장식입니다. 빈 상태의 유형을 전달할 때 아이콘이나 그 색상에 의존하지 마세요.
  • "가이드 읽기"는 다른 위치로 이동하므로 버튼 모양의 링크를 사용하고, "새 프로젝트"는 동작을 실행하므로 버튼을 사용합니다.
  • 빈 상태에서도 내용이 채워진 뷰와 동일한 주요 동작을 제공합니다. 사용자가 한 번 익힌 동작을 그대로 사용할 수 있습니다.