본문으로 건너뛰기

구성 요소

카드

헤더, 본문, 푸터를 묶는 표면입니다.

사용법

기본

Deployment

Ship the current branch to production.

HTML
<bs:bsui-card>
  <bs:bsui-card-header>
    <bs:bsui-card-title label="Deployment" />
    <bs:bsui-card-description label="Ship the current branch to production." />
  </bs:bsui-card-header>
  <bs:bsui-card-content>
    <bs:bsui-input placeholder="Release name" />
  </bs:bsui-card-content>
  <bs:bsui-card-footer>
    <bs:bsui-button label="Deploy" />
  </bs:bsui-card-footer>
</bs:bsui-card>

메트릭 카드

푸터가 없고, 양식 대신 콘텐츠에 숫자가 담깁니다.

Active installs

Counted across every site on this licence.

12,480

+8.2%

Up from 11,530 at the end of last month.

HTML
<bs:bsui-card>
  <bs:bsui-card-header>
    <bs:bsui-card-title label="Active installs" />
    <bs:bsui-card-description label="Counted across every site on this licence." />
  </bs:bsui-card-header>
  <bs:bsui-card-content>
    <bs:bsui-stack direction="row" gap="3" align="center">
      <bs:bsui-text content="12,480" variant="heading" tag="p" />
      <bs:bsui-badge label="+8.2%" variant="success" />
    </bs:bsui-stack>
    <bs:bsui-text content="Up from 11,530 at the end of last month." variant="caption" />
  </bs:bsui-card-content>
</bs:bsui-card>

미디어가 있는 카드

콘텐츠에 화면 비율을 지정해 이미지 영역의 모양을 고정합니다.

Latest snapshot

Captured from the homepage after the last deploy.

Homepage

Taken 4 minutes ago

HTML
<bs:bsui-card>
  <bs:bsui-card-header>
    <bs:bsui-card-title label="Latest snapshot" />
    <bs:bsui-card-description label="Captured from the homepage after the last deploy." />
  </bs:bsui-card-header>
  <bs:bsui-card-content>
    <bs:bsui-aspect-ratio ratio="16/9" background="var(--color-surface)">
      <bs:bsui-text content="Homepage" variant="muted" />
    </bs:bsui-aspect-ratio>
    <bs:bsui-text content="Taken 4 minutes ago" variant="caption" />
  </bs:bsui-card-content>
  <bs:bsui-card-footer>
    <bs:bsui-button label="Open the site" variant="outline" size="sm" />
    <bs:bsui-button label="Recapture" variant="ghost" size="sm" />
  </bs:bsui-card-footer>
</bs:bsui-card>

나란히 놓인 카드

카드를 쌓으면 높이가 같은 열로 배치됩니다.

Starter

For a single site and the person who runs it.

99 euro a year

Studio

For agencies shipping client work every week.

249 euro a year

HTML
<bs:bsui-stack direction="row" gap="4" align="stretch">
  <bs:bsui-card>
    <bs:bsui-card-header>
      <bs:bsui-card-title label="Starter" />
      <bs:bsui-card-description label="For a single site and the person who runs it." />
    </bs:bsui-card-header>
    <bs:bsui-card-content>
      <bs:bsui-text content="99 euro a year" variant="title" tag="p" />
    </bs:bsui-card-content>
    <bs:bsui-card-footer>
      <bs:bsui-button label="Choose Starter" variant="outline" />
    </bs:bsui-card-footer>
  </bs:bsui-card>
  <bs:bsui-card>
    <bs:bsui-card-header>
      <bs:bsui-card-title label="Studio" />
      <bs:bsui-card-description label="For agencies shipping client work every week." />
    </bs:bsui-card-header>
    <bs:bsui-card-content>
      <bs:bsui-text content="249 euro a year" variant="title" tag="p" />
    </bs:bsui-card-content>
    <bs:bsui-card-footer>
      <bs:bsui-button label="Choose Studio" />
    </bs:bsui-card-footer>
  </bs:bsui-card>
</bs:bsui-stack>

구조

카드의 구성 블록은 아래와 같습니다. 각 블록은 별도의 블록이며 부모 블록 안에서만 렌더링됩니다.

  • bsui/card
  • bsui/card-content
  • bsui/card-footer
  • bsui/card-header
  • bsui/card-description
  • bsui/card-title

속성

이 블록은 속성을 받지 않습니다.

bsui/card-content

이 블록은 속성을 받지 않습니다.

속성유형기본값
justify start center end between start

bsui/card-header

이 블록은 속성을 받지 않습니다.

bsui/card-description

속성유형기본값
label richtext —

bsui/card-title

속성유형기본값
label richtext —