탐색

v2.1.0
피드백

빈 상태

뷰에 아직 표시할 내용이 없을 때 나타나는 상태입니다.

이 페이지의 내용

빈 상태는 뷰에 아직 표시할 내용이 없을 때 나타납니다. 여기에 어떤 내용이 들어가는지 알려 주고, 내용을 채울 수 있는 동작을 제공합니다. 가운데 정렬된 세로 배치이며, 맨 위에 아이콘 프레임을 둡니다. 별도의 표면 없이 카드나 오목한 영역 안에 넣거나 페이지에 바로 배치할 수 있습니다.

빈 상태

<div class="well">  <div class="empty">    <div class="icon-frame icon-frame-raised 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="M9.4989 2.6265A0.625 0.625 0 0 0 9.375 3L9.3758 12.0307A0.625 0.625 0 0 0 10.6182 12.0917L10.625 12L10.623 2.95A0.6252 0.6252 0 0 0 10.5011 2.6265Q10.2855 2.4578 10 2.4578Q9.7145 2.4578 9.4989 2.6265Z" fill="currentColor" stroke="none" fill-rule="evenodd" /><path d="M6.5 6.5L9.8586 3.1414A0.2 0.2 0 0 1 10.1414 3.1414L13.5 6.5" /><path d="M3 13.5L3 15.75A1.25 1.25 0 0 0 4.25 17L15.75 17A1.25 1.25 0 0 0 17 15.75L17 13.5" />      </svg>    </div>    <h3 class="empty-title">No deployments yet</h3>    <p class="empty-description">      Push to the main branch, or deploy from the dashboard, and the deployment appears here.    </p>    <div class="empty-actions">      <button type="button" class="btn btn-sm">Read the guide</button>      <button type="button" class="btn btn-sm btn-primary">Deploy now</button>    </div>  </div></div>
import UploadIcon from '@master/icons-react/native/20/soft/upload'<div className="well">  <div className="empty">    <div className="icon-frame icon-frame-raised empty-media" aria-hidden="true">      <UploadIcon className="icon" />    </div>    <h3 className="empty-title">No deployments yet</h3>    <p className="empty-description">      Push to the main branch, or deploy from the dashboard, and the deployment appears here.    </p>    <div className="empty-actions">      <button type="button" className="btn btn-sm">Read the guide</button>      <button type="button" className="btn btn-sm btn-primary">Deploy now</button>    </div>  </div></div>
<script>  import UploadIcon from '@master/icons-svelte/native/20/soft/upload'</script><div class="well">  <div class="empty">    <div class="icon-frame icon-frame-raised empty-media" aria-hidden="true">      <UploadIcon class="icon" />    </div>    <h3 class="empty-title">No deployments yet</h3>    <p class="empty-description">      Push to the main branch, or deploy from the dashboard, and the deployment appears here.    </p>    <div class="empty-actions">      <button type="button" class="btn btn-sm">Read the guide</button>      <button type="button" class="btn btn-sm btn-primary">Deploy now</button>    </div>  </div></div>
<script setup>import UploadIcon from '@master/icons-vue/native/20/soft/upload'</script><template>  <div class="well">    <div class="empty">      <div class="icon-frame icon-frame-raised empty-media" aria-hidden="true">        <UploadIcon class="icon" />      </div>      <h3 class="empty-title">No deployments yet</h3>      <p class="empty-description">        Push to the main branch, or deploy from the dashboard, and the deployment appears here.      </p>      <div class="empty-actions">        <button type="button" class="btn btn-sm">Read the guide</button>        <button type="button" class="btn btn-sm btn-primary">Deploy now</button>      </div>    </div>  </div></template>

필터를 적용하거나 검색한 결과가 없으면 어떤 조건으로 조회했는지 알려 주고 돌아갈 방법을 제공하세요. 미디어와 동작은 필요에 따라 추가할 수 있습니다.

검색 결과 없음

<div class="empty">  <h3 class="empty-title">No projects match "atlsa"</h3>  <p class="empty-description">Check the spelling, or clear the search to see all 12 projects.</p>  <div class="empty-actions"><button type="button" class="btn btn-sm">Clear search</button></div></div>
<div className="empty">  <h3 className="empty-title">No projects match "atlsa"</h3>  <p className="empty-description">    Check the spelling, or clear the search to see all 12 projects.  </p>  <div className="empty-actions">    <button type="button" className="btn btn-sm">Clear search</button>  </div></div>
<div class="empty">  <h3 class="empty-title">No projects match "atlsa"</h3>  <p class="empty-description">Check the spelling, or clear the search to see all 12 projects.</p>  <div class="empty-actions"><button type="button" class="btn btn-sm">Clear search</button></div></div>
<template>  <div class="empty">    <h3 class="empty-title">No projects match "atlsa"</h3>    <p class="empty-description">Check the spelling, or clear the search to see all 12 projects.</p>    <div class="empty-actions"><button type="button" class="btn btn-sm">Clear search</button></div>  </div></template>

#아이콘

아이콘은 아이콘 프레임 안에 놓이며, 프레임이 아이콘의 재질을 정합니다. 기본적으로는 페이지에 눌린 오목한 영역이고, 위 예시처럼 빈 상태가 오목한 영역 안에 놓일 때는 icon-frame-raised로 살짝 올라온 시트를 사용합니다. 프레임에 empty-media를 지정하면 세로 배치 안에서 자리를 잡으며, 그 아래에는 텍스트 사이보다 조금 더 넓은 간격이 생깁니다. 프레임은 장식 요소이므로, 무엇이 없는지는 제목으로 전달합니다.

#빈 상태 작성

  • 제목은 현재 상태를 쉬운 말로 구체적으로 알려 주세요. 예를 들어 "아무것도 없습니다"보다 "아직 배포 내역이 없습니다"가 적절합니다.
  • 설명에는 뷰에 내용을 채우는 방법을 한두 문장으로 적으세요. 텍스트는 24rem 너비에서 줄바꿈됩니다.
  • 주요 동작은 하나만 제공하세요. 덜 두드러지는 보조 동작으로 문서 링크를 제공할 수 있습니다.

#클래스

클래스설명
empty가운데 정렬된 열
empty-media맨 위의 icon-frame에 지정합니다. 무엇이 없는지 종류를 나타내며, 아래에 여백을 둡니다.
empty-title"아직 배포 내역이 없습니다"처럼 상태를 쉬운 말로 표현한 문구
empty-description뷰가 어떻게 채워지는지 한두 문장으로 설명합니다. 텍스트는 24rem 너비에서 줄바꿈됩니다
empty-actions가운데 정렬된 버튼 행

#소스

@master/ui/components/empty.css
/* * Empty: what a view shows when it has nothing to show yet: what belongs here, and the action that fills it. * A centered column, headed by an icon frame. It has no surface of its own; put it in a card, a sheet or a * well, or let it stand on the page. The frame's material is the icon frame's; empty-media only gives it its * place in the column. */@layer components.ui {  .empty {    display: flex;    flex-direction: column;    align-items: center;    gap: .375rem;    min-width: 0;    padding: 2.5rem 1.5rem;    color: var(--color-text-muted);    font-size: .875rem;    line-height: 1.55;    text-align: center;  }  /* The icon frame that names the kind of thing that is missing: a little more room under it than between the words. */  .empty-media {    margin-block-end: .625rem;  }  .empty-title {    margin: 0;    color: var(--color-text-strong);    font: var(--font-weight-control) .9375rem/1.4 var(--font-family-sans);    font-feature-settings: inherit;    text-wrap: balance;    overflow-wrap: anywhere;  }  .empty-description {    max-width: 24rem;    margin: 0;    text-wrap: pretty;    overflow-wrap: anywhere;  }  /* The actions stand 24px under the words: the column's 6px gap and 18px more. */  .empty-actions {    display: flex;    flex-wrap: wrap;    justify-content: center;    gap: .5rem;    margin-block-start: 1.125rem;  }}