벤토
크기가 다양한 타일을 한 상자에 배치하고, 상자에 여유 공간이 얼마나 있는지에 따라 열 구성을 조정합니다.
이 페이지의 내용
벤토는 제품 기능이나 프로필의 주요 내용을 소개할 때처럼 크기가 다른 타일 몇 개를 한 상자에 배치합니다. 큰 타일 하나 옆에 세로로 긴 타일을 두고, 그 주위에 작은 타일 몇 개를 놓습니다. 벤토는 배치만 담당하므로 자체 표면을 그리지 않습니다. 타일은 카드, 시트와 그 안의 콘텐츠로 구성됩니다.
벤토는 열의 개수와 각 타일이 차지할 수 있는 범위를 정합니다. 둘 다 뷰포트가 아닌 벤토에 주어진 너비를 따릅니다. 48rem 이상이면 4열, 28rem 이상 48rem 미만이면 2열, 28rem 미만이면 1열입니다. 넓은 벤토에서 두 열을 차지하는 타일은 2열에서는 한 행 전체를, 1열에서는 한 칸을 차지합니다. 같은 마크업으로 데스크톱에서는 모자이크 형태를, 휴대폰에서는 단일 열을 표시할 수 있습니다.
벤토
<section class="flex flex-col gap-xl p-xl bg-surface-base fg-text-body text-sm" aria-labelledby="bento-title"> <header class="flex flex-col gap-xs max-w(560)"> <p class="eyebrow">Platform</p> <h2 class="heading heading-xl" id="bento-title">Everything a deploy needs</h2> </header> <div class="bento"> <article class="card card-split bento-large"> <img class="card-media" src="/demo/moonstone.svg" alt> <header class="card-header"> <h3 class="card-title">Live at the edge</h3> <p class="card-description"> Every push is served from 14 regions before the review is done. </p> </header> <p class="card-body"> Static files, functions and images are cached where the reader is, and purged the moment a deploy replaces them. </p> <footer class="card-footer"><a class="btn btn-sm" href="#regions">See the regions</a></footer> </article> <article class="card bento-tall"> <header class="card-header"> <h3 class="card-title">Reviewed together</h3> <p class="card-description">Comments land on the preview, beside what they are about.</p> </header> <div class="card-body flex flex-col gap-sm"> <div class="avatar-group" role="group" aria-label="Ada Lovelace, Alan Turing, Grace Hopper and 5 others"> <span class="avatar avatar-sm"> <img class="avatar-image" src="/demo/portrait-1.svg" alt> </span> <span class="avatar avatar-sm"> <img class="avatar-image" src="/demo/portrait-2.svg" alt> </span> <span class="avatar avatar-sm"> <img class="avatar-image" src="/demo/portrait-3.svg" alt> </span> <span class="avatar avatar-sm" aria-hidden="true">+5</span> </div> <p class="m(0)"> Eight people left 23 comments on this week's previews. Four are still open. </p> </div> <footer class="card-footer"><a class="btn btn-sm" href="#comments">Open comments</a></footer> </article> <article class="card"> <div class="stat"> <p class="stat-label">Cold builds</p> <div class="stat-row"> <p class="stat-value">38s</p> <p class="stat-delta">21% faster</p> </div> <p class="stat-description">Caches are restored before the install.</p> </div> </article> <article class="card"> <header class="card-header"> <h3 class="card-title">Rollbacks</h3> <p class="card-description">Any deploy is one click away, and so is the one before it.</p> </header> </article> <article class="card bento-wide"> <header class="card-header"> <h3 class="card-title">Builds this week</h3> <p class="card-description">Thursday so far</p> </header> <figure class="chart chart-quiet" style="--chart-height: 4.5rem"> <div class="chart-body"> <svg class="chart-plot" role="list" aria-label="Builds per day, this week"> <g aria-hidden="true"> <line class="chart-grid chart-grid-base" x1="0" y1="100%" x2="100%" y2="100%" /> <line class="chart-grid" x1="0" y1="75%" x2="100%" y2="75%" /> <line class="chart-grid" x1="0" y1="50%" x2="100%" y2="50%" /> <line class="chart-grid" x1="0" y1="25%" x2="100%" y2="25%" /> <line class="chart-grid" x1="0" y1="0%" x2="100%" y2="0%" /> <text class="chart-tick chart-tick-x" x="7.143%" y="100%">Mon</text> <text class="chart-tick chart-tick-x" x="21.429%" y="100%">Tue</text> <text class="chart-tick chart-tick-x" x="35.714%" y="100%">Wed</text> <text class="chart-tick chart-tick-x" x="50%" y="100%">Thu</text> <text class="chart-tick chart-tick-x" x="64.286%" y="100%">Fri</text> <text class="chart-tick chart-tick-x" x="78.571%" y="100%">Sat</text> <text class="chart-tick chart-tick-x" x="92.857%" y="100%">Sun</text> </g> <g class="chart-point" role="listitem" aria-label="Mon: 42"> <rect class="chart-hit" x="0%" y="0" width="14.286%" height="100%" /> <rect class="chart-bar" x="2.714%" y="47.5%" width="8.857%" height="52.5%" /> </g> <g class="chart-point" role="listitem" aria-label="Tue: 58"> <rect class="chart-hit" x="14.286%" y="0" width="14.286%" height="100%" /> <rect class="chart-bar" x="17%" y="27.5%" width="8.857%" height="72.5%" /> </g> <g class="chart-point" role="listitem" aria-label="Wed: 36"> <rect class="chart-hit" x="28.571%" y="0" width="14.286%" height="100%" /> <rect class="chart-bar" x="31.286%" y="55%" width="8.857%" height="45%" /> </g> <g class="chart-point" role="listitem" aria-label="Thu: 71" aria-current="true"> <rect class="chart-hit" x="42.857%" y="0" width="14.286%" height="100%" /> <rect class="chart-bar" x="45.571%" y="11.25%" width="8.857%" height="88.75%" /> </g> <g class="chart-point" role="listitem" aria-label="Fri: 0"> <rect class="chart-hit" x="57.143%" y="0" width="14.286%" height="100%" /> <rect class="chart-bar" x="59.857%" y="99.4%" width="8.857%" height="0.6%" /> </g> <g class="chart-point" role="listitem" aria-label="Sat: 0"> <rect class="chart-hit" x="71.429%" y="0" width="14.286%" height="100%" /> <rect class="chart-bar" x="74.143%" y="99.4%" width="8.857%" height="0.6%" /> </g> <g class="chart-point" role="listitem" aria-label="Sun: 0"> <rect class="chart-hit" x="85.714%" y="0" width="14.286%" height="100%" /> <rect class="chart-bar" x="88.429%" y="99.4%" width="8.857%" height="0.6%" /> </g> </svg> </div> </figure> </article> <article class="sheet sheet-inverse bento-wide flex flex-col justify-between gap-md p(20)"> <div class="flex flex-col gap-3xs"> <h3 class="heading heading-sm fg-text-inverse">Start on the free plan</h3> <p class="m(0)">Three projects and every feature above. No card needed.</p> </div> <div class="flex"><a class="btn btn-sm" href="#start">Create a project</a></div> </article> </div></section><section className="flex flex-col gap-xl p-xl bg-surface-base fg-text-body text-sm" aria-labelledby="bento-title"> <header className="flex flex-col gap-xs max-w(560)"> <p className="eyebrow">Platform</p> <h2 className="heading heading-xl" id="bento-title">Everything a deploy needs</h2> </header> <div className="bento"> <article className="card card-split bento-large"> <img className="card-media" src="/demo/moonstone.svg" alt="" /> <header className="card-header"> <h3 className="card-title">Live at the edge</h3> <p className="card-description"> Every push is served from 14 regions before the review is done. </p> </header> <p className="card-body"> Static files, functions and images are cached where the reader is, and purged the moment a deploy replaces them. </p> <footer className="card-footer"> <a className="btn btn-sm" href="#regions">See the regions</a> </footer> </article> <article className="card bento-tall"> <header className="card-header"> <h3 className="card-title">Reviewed together</h3> <p className="card-description"> Comments land on the preview, beside what they are about. </p> </header> <div className="card-body flex flex-col gap-sm"> <div className="avatar-group" role="group" aria-label="Ada Lovelace, Alan Turing, Grace Hopper and 5 others"> <span className="avatar avatar-sm"> <img className="avatar-image" src="/demo/portrait-1.svg" alt="" /> </span> <span className="avatar avatar-sm"> <img className="avatar-image" src="/demo/portrait-2.svg" alt="" /> </span> <span className="avatar avatar-sm"> <img className="avatar-image" src="/demo/portrait-3.svg" alt="" /> </span> <span className="avatar avatar-sm" aria-hidden="true">+5</span> </div> <p className="m(0)"> Eight people left 23 comments on this week's previews. Four are still open. </p> </div> <footer className="card-footer"> <a className="btn btn-sm" href="#comments">Open comments</a> </footer> </article> <article className="card"> <div className="stat"> <p className="stat-label">Cold builds</p> <div className="stat-row"> <p className="stat-value">38s</p> <p className="stat-delta">21% faster</p> </div> <p className="stat-description">Caches are restored before the install.</p> </div> </article> <article className="card"> <header className="card-header"> <h3 className="card-title">Rollbacks</h3> <p className="card-description"> Any deploy is one click away, and so is the one before it. </p> </header> </article> <article className="card bento-wide"> <header className="card-header"> <h3 className="card-title">Builds this week</h3> <p className="card-description">Thursday so far</p> </header> <figure className="chart chart-quiet" style={{ '--chart-height': '4.5rem' } as React.CSSProperties}> <div className="chart-body"> <svg className="chart-plot" role="list" aria-label="Builds per day, this week"> <g aria-hidden="true"> <line className="chart-grid chart-grid-base" x1="0" y1="100%" x2="100%" y2="100%" /> <line className="chart-grid" x1="0" y1="75%" x2="100%" y2="75%" /> <line className="chart-grid" x1="0" y1="50%" x2="100%" y2="50%" /> <line className="chart-grid" x1="0" y1="25%" x2="100%" y2="25%" /> <line className="chart-grid" x1="0" y1="0%" x2="100%" y2="0%" /> <text className="chart-tick chart-tick-x" x="7.143%" y="100%">Mon</text> <text className="chart-tick chart-tick-x" x="21.429%" y="100%">Tue</text> <text className="chart-tick chart-tick-x" x="35.714%" y="100%">Wed</text> <text className="chart-tick chart-tick-x" x="50%" y="100%">Thu</text> <text className="chart-tick chart-tick-x" x="64.286%" y="100%">Fri</text> <text className="chart-tick chart-tick-x" x="78.571%" y="100%">Sat</text> <text className="chart-tick chart-tick-x" x="92.857%" y="100%">Sun</text> </g> <g className="chart-point" role="listitem" aria-label="Mon: 42"> <rect className="chart-hit" x="0%" y="0" width="14.286%" height="100%" /> <rect className="chart-bar" x="2.714%" y="47.5%" width="8.857%" height="52.5%" /> </g> <g className="chart-point" role="listitem" aria-label="Tue: 58"> <rect className="chart-hit" x="14.286%" y="0" width="14.286%" height="100%" /> <rect className="chart-bar" x="17%" y="27.5%" width="8.857%" height="72.5%" /> </g> <g className="chart-point" role="listitem" aria-label="Wed: 36"> <rect className="chart-hit" x="28.571%" y="0" width="14.286%" height="100%" /> <rect className="chart-bar" x="31.286%" y="55%" width="8.857%" height="45%" /> </g> <g className="chart-point" role="listitem" aria-label="Thu: 71" aria-current="true"> <rect className="chart-hit" x="42.857%" y="0" width="14.286%" height="100%" /> <rect className="chart-bar" x="45.571%" y="11.25%" width="8.857%" height="88.75%" /> </g> <g className="chart-point" role="listitem" aria-label="Fri: 0"> <rect className="chart-hit" x="57.143%" y="0" width="14.286%" height="100%" /> <rect className="chart-bar" x="59.857%" y="99.4%" width="8.857%" height="0.6%" /> </g> <g className="chart-point" role="listitem" aria-label="Sat: 0"> <rect className="chart-hit" x="71.429%" y="0" width="14.286%" height="100%" /> <rect className="chart-bar" x="74.143%" y="99.4%" width="8.857%" height="0.6%" /> </g> <g className="chart-point" role="listitem" aria-label="Sun: 0"> <rect className="chart-hit" x="85.714%" y="0" width="14.286%" height="100%" /> <rect className="chart-bar" x="88.429%" y="99.4%" width="8.857%" height="0.6%" /> </g> </svg> </div> </figure> </article> <article className="sheet sheet-inverse bento-wide flex flex-col justify-between gap-md p(20)"> <div className="flex flex-col gap-3xs"> <h3 className="heading heading-sm fg-text-inverse">Start on the free plan</h3> <p className="m(0)">Three projects and every feature above. No card needed.</p> </div> <div className="flex"><a className="btn btn-sm" href="#start">Create a project</a></div> </article> </div></section><section class="flex flex-col gap-xl p-xl bg-surface-base fg-text-body text-sm" aria-labelledby="bento-title"> <header class="flex flex-col gap-xs max-w(560)"> <p class="eyebrow">Platform</p> <h2 class="heading heading-xl" id="bento-title">Everything a deploy needs</h2> </header> <div class="bento"> <article class="card card-split bento-large"> <img class="card-media" src="/demo/moonstone.svg" alt> <header class="card-header"> <h3 class="card-title">Live at the edge</h3> <p class="card-description"> Every push is served from 14 regions before the review is done. </p> </header> <p class="card-body"> Static files, functions and images are cached where the reader is, and purged the moment a deploy replaces them. </p> <footer class="card-footer"><a class="btn btn-sm" href="#regions">See the regions</a></footer> </article> <article class="card bento-tall"> <header class="card-header"> <h3 class="card-title">Reviewed together</h3> <p class="card-description">Comments land on the preview, beside what they are about.</p> </header> <div class="card-body flex flex-col gap-sm"> <div class="avatar-group" role="group" aria-label="Ada Lovelace, Alan Turing, Grace Hopper and 5 others"> <span class="avatar avatar-sm"> <img class="avatar-image" src="/demo/portrait-1.svg" alt> </span> <span class="avatar avatar-sm"> <img class="avatar-image" src="/demo/portrait-2.svg" alt> </span> <span class="avatar avatar-sm"> <img class="avatar-image" src="/demo/portrait-3.svg" alt> </span> <span class="avatar avatar-sm" aria-hidden="true">+5</span> </div> <p class="m(0)"> Eight people left 23 comments on this week's previews. Four are still open. </p> </div> <footer class="card-footer"><a class="btn btn-sm" href="#comments">Open comments</a></footer> </article> <article class="card"> <div class="stat"> <p class="stat-label">Cold builds</p> <div class="stat-row"> <p class="stat-value">38s</p> <p class="stat-delta">21% faster</p> </div> <p class="stat-description">Caches are restored before the install.</p> </div> </article> <article class="card"> <header class="card-header"> <h3 class="card-title">Rollbacks</h3> <p class="card-description">Any deploy is one click away, and so is the one before it.</p> </header> </article> <article class="card bento-wide"> <header class="card-header"> <h3 class="card-title">Builds this week</h3> <p class="card-description">Thursday so far</p> </header> <figure class="chart chart-quiet" style="--chart-height: 4.5rem"> <div class="chart-body"> <svg class="chart-plot" role="list" aria-label="Builds per day, this week"> <g aria-hidden="true"> <line class="chart-grid chart-grid-base" x1="0" y1="100%" x2="100%" y2="100%" /> <line class="chart-grid" x1="0" y1="75%" x2="100%" y2="75%" /> <line class="chart-grid" x1="0" y1="50%" x2="100%" y2="50%" /> <line class="chart-grid" x1="0" y1="25%" x2="100%" y2="25%" /> <line class="chart-grid" x1="0" y1="0%" x2="100%" y2="0%" /> <text class="chart-tick chart-tick-x" x="7.143%" y="100%">Mon</text> <text class="chart-tick chart-tick-x" x="21.429%" y="100%">Tue</text> <text class="chart-tick chart-tick-x" x="35.714%" y="100%">Wed</text> <text class="chart-tick chart-tick-x" x="50%" y="100%">Thu</text> <text class="chart-tick chart-tick-x" x="64.286%" y="100%">Fri</text> <text class="chart-tick chart-tick-x" x="78.571%" y="100%">Sat</text> <text class="chart-tick chart-tick-x" x="92.857%" y="100%">Sun</text> </g> <g class="chart-point" role="listitem" aria-label="Mon: 42"> <rect class="chart-hit" x="0%" y="0" width="14.286%" height="100%" /> <rect class="chart-bar" x="2.714%" y="47.5%" width="8.857%" height="52.5%" /> </g> <g class="chart-point" role="listitem" aria-label="Tue: 58"> <rect class="chart-hit" x="14.286%" y="0" width="14.286%" height="100%" /> <rect class="chart-bar" x="17%" y="27.5%" width="8.857%" height="72.5%" /> </g> <g class="chart-point" role="listitem" aria-label="Wed: 36"> <rect class="chart-hit" x="28.571%" y="0" width="14.286%" height="100%" /> <rect class="chart-bar" x="31.286%" y="55%" width="8.857%" height="45%" /> </g> <g class="chart-point" role="listitem" aria-label="Thu: 71" aria-current="true"> <rect class="chart-hit" x="42.857%" y="0" width="14.286%" height="100%" /> <rect class="chart-bar" x="45.571%" y="11.25%" width="8.857%" height="88.75%" /> </g> <g class="chart-point" role="listitem" aria-label="Fri: 0"> <rect class="chart-hit" x="57.143%" y="0" width="14.286%" height="100%" /> <rect class="chart-bar" x="59.857%" y="99.4%" width="8.857%" height="0.6%" /> </g> <g class="chart-point" role="listitem" aria-label="Sat: 0"> <rect class="chart-hit" x="71.429%" y="0" width="14.286%" height="100%" /> <rect class="chart-bar" x="74.143%" y="99.4%" width="8.857%" height="0.6%" /> </g> <g class="chart-point" role="listitem" aria-label="Sun: 0"> <rect class="chart-hit" x="85.714%" y="0" width="14.286%" height="100%" /> <rect class="chart-bar" x="88.429%" y="99.4%" width="8.857%" height="0.6%" /> </g> </svg> </div> </figure> </article> <article class="sheet sheet-inverse bento-wide flex flex-col justify-between gap-md p(20)"> <div class="flex flex-col gap-3xs"> <h3 class="heading heading-sm fg-text-inverse">Start on the free plan</h3> <p class="m(0)">Three projects and every feature above. No card needed.</p> </div> <div class="flex"><a class="btn btn-sm" href="#start">Create a project</a></div> </article> </div></section><template> <section class="flex flex-col gap-xl p-xl bg-surface-base fg-text-body text-sm" aria-labelledby="bento-title"> <header class="flex flex-col gap-xs max-w(560)"> <p class="eyebrow">Platform</p> <h2 class="heading heading-xl" id="bento-title">Everything a deploy needs</h2> </header> <div class="bento"> <article class="card card-split bento-large"> <img class="card-media" src="/demo/moonstone.svg" alt> <header class="card-header"> <h3 class="card-title">Live at the edge</h3> <p class="card-description"> Every push is served from 14 regions before the review is done. </p> </header> <p class="card-body"> Static files, functions and images are cached where the reader is, and purged the moment a deploy replaces them. </p> <footer class="card-footer"> <a class="btn btn-sm" href="#regions">See the regions</a> </footer> </article> <article class="card bento-tall"> <header class="card-header"> <h3 class="card-title">Reviewed together</h3> <p class="card-description">Comments land on the preview, beside what they are about.</p> </header> <div class="card-body flex flex-col gap-sm"> <div class="avatar-group" role="group" aria-label="Ada Lovelace, Alan Turing, Grace Hopper and 5 others"> <span class="avatar avatar-sm"> <img class="avatar-image" src="/demo/portrait-1.svg" alt> </span> <span class="avatar avatar-sm"> <img class="avatar-image" src="/demo/portrait-2.svg" alt> </span> <span class="avatar avatar-sm"> <img class="avatar-image" src="/demo/portrait-3.svg" alt> </span> <span class="avatar avatar-sm" aria-hidden="true">+5</span> </div> <p class="m(0)"> Eight people left 23 comments on this week's previews. Four are still open. </p> </div> <footer class="card-footer"> <a class="btn btn-sm" href="#comments">Open comments</a> </footer> </article> <article class="card"> <div class="stat"> <p class="stat-label">Cold builds</p> <div class="stat-row"> <p class="stat-value">38s</p> <p class="stat-delta">21% faster</p> </div> <p class="stat-description">Caches are restored before the install.</p> </div> </article> <article class="card"> <header class="card-header"> <h3 class="card-title">Rollbacks</h3> <p class="card-description">Any deploy is one click away, and so is the one before it.</p> </header> </article> <article class="card bento-wide"> <header class="card-header"> <h3 class="card-title">Builds this week</h3> <p class="card-description">Thursday so far</p> </header> <figure class="chart chart-quiet" style="--chart-height: 4.5rem"> <div class="chart-body"> <svg class="chart-plot" role="list" aria-label="Builds per day, this week"> <g aria-hidden="true"> <line class="chart-grid chart-grid-base" x1="0" y1="100%" x2="100%" y2="100%" /> <line class="chart-grid" x1="0" y1="75%" x2="100%" y2="75%" /> <line class="chart-grid" x1="0" y1="50%" x2="100%" y2="50%" /> <line class="chart-grid" x1="0" y1="25%" x2="100%" y2="25%" /> <line class="chart-grid" x1="0" y1="0%" x2="100%" y2="0%" /> <text class="chart-tick chart-tick-x" x="7.143%" y="100%">Mon</text> <text class="chart-tick chart-tick-x" x="21.429%" y="100%">Tue</text> <text class="chart-tick chart-tick-x" x="35.714%" y="100%">Wed</text> <text class="chart-tick chart-tick-x" x="50%" y="100%">Thu</text> <text class="chart-tick chart-tick-x" x="64.286%" y="100%">Fri</text> <text class="chart-tick chart-tick-x" x="78.571%" y="100%">Sat</text> <text class="chart-tick chart-tick-x" x="92.857%" y="100%">Sun</text> </g> <g class="chart-point" role="listitem" aria-label="Mon: 42"> <rect class="chart-hit" x="0%" y="0" width="14.286%" height="100%" /> <rect class="chart-bar" x="2.714%" y="47.5%" width="8.857%" height="52.5%" /> </g> <g class="chart-point" role="listitem" aria-label="Tue: 58"> <rect class="chart-hit" x="14.286%" y="0" width="14.286%" height="100%" /> <rect class="chart-bar" x="17%" y="27.5%" width="8.857%" height="72.5%" /> </g> <g class="chart-point" role="listitem" aria-label="Wed: 36"> <rect class="chart-hit" x="28.571%" y="0" width="14.286%" height="100%" /> <rect class="chart-bar" x="31.286%" y="55%" width="8.857%" height="45%" /> </g> <g class="chart-point" role="listitem" aria-label="Thu: 71" aria-current="true"> <rect class="chart-hit" x="42.857%" y="0" width="14.286%" height="100%" /> <rect class="chart-bar" x="45.571%" y="11.25%" width="8.857%" height="88.75%" /> </g> <g class="chart-point" role="listitem" aria-label="Fri: 0"> <rect class="chart-hit" x="57.143%" y="0" width="14.286%" height="100%" /> <rect class="chart-bar" x="59.857%" y="99.4%" width="8.857%" height="0.6%" /> </g> <g class="chart-point" role="listitem" aria-label="Sat: 0"> <rect class="chart-hit" x="71.429%" y="0" width="14.286%" height="100%" /> <rect class="chart-bar" x="74.143%" y="99.4%" width="8.857%" height="0.6%" /> </g> <g class="chart-point" role="listitem" aria-label="Sun: 0"> <rect class="chart-hit" x="85.714%" y="0" width="14.286%" height="100%" /> <rect class="chart-bar" x="88.429%" y="99.4%" width="8.857%" height="0.6%" /> </g> </svg> </div> </figure> </article> <article class="sheet sheet-inverse bento-wide flex flex-col justify-between gap-md p(20)"> <div class="flex flex-col gap-3xs"> <h3 class="heading heading-sm fg-text-inverse">Start on the free plan</h3> <p class="m(0)">Three projects and every feature above. No card needed.</p> </div> <div class="flex"><a class="btn btn-sm" href="#start">Create a project</a></div> </article> </div> </section></template>#구성 원리
- 자체 너비에 따른 열 개수. 컨테이너는 자기 자신의 크기를 쿼리할 수 없으므로 벤토는 자동 그리드와 같은 방식으로 열 개수를 정합니다.
repeat(auto-fill, …)에 트랙의 최소 너비를 지정합니다. 이 최소 너비는 48rem 이상에서 전체 너비의 4분의 1, 28rem 이상 48rem 미만에서 절반, 28rem 미만에서 전체 너비입니다. 따라서 auto-fill이 만드는 열은 4개, 2개, 1개이며 3개가 되는 경우는 없습니다. - 열 개수에 따른 타일 범위. 벤토는 이름이
bento인 크기 컨테이너이며, 열 개수를 정할 때와 같은 너비를 기준으로 측정됩니다.bento-wide,bento-tall,bento-large는 벤토가 두 열을 확보하는 28rem 이상에서만 여러 칸을 차지합니다.bento-full은 너비와 관계없이 한 행 전체를 차지합니다. - 행의 최소 높이. 행의 최소 높이는
--bento-row로 정하며 기본값은 10rem입니다. 행은 콘텐츠에 따라 더 높아집니다. 세로로 긴 타일은 콘텐츠와 관계없이 두 행과 그 사이의 간격을 차지합니다. - 마크업 순서에 따른 타일 배치. 위의 타일 6개는 4열과 2열 모두에서 빈틈없이 배치되도록 작성했습니다. 큰 타일과 세로로 긴 타일을 먼저 두고, 긴 타일 옆의 열을 채우는 작은 타일 두 개와 가로로 넓은 타일 두 개를 차례로 배치합니다.
- 타일을 구성하는 컴포넌트. 분할 카드는 타일이 넓으면 이미지를 텍스트 옆에, 좁으면 텍스트 위에 배치합니다. 수치 표시에 쓰인 컴포넌트는 지표와 간결한 차트입니다. 마지막 타일은 이 페이지에서 유일한 반전 시트입니다.
#타일
클래스가 없는 타일은 한 칸을 차지합니다. 타일을 확장하는 클래스는 네 가지입니다.
| 클래스 | 4열에서 | 2열에서 | 1열에서 |
|---|---|---|---|
bento-wide | 두 열 | 한 행 전체 | 한 칸 |
bento-tall | 두 행 | 두 행 | 한 칸 |
bento-large | 두 열, 두 행 | 한 행 전체 너비, 두 행 | 한 칸 |
bento-full | 한 행 전체 | 한 행 전체 | 한 행 전체 |
타일
<div class="bento p-lg bg-surface-base fg-text-muted text-2xl font-mono" style="--bento-row: 5rem"> <div class="well flex items-center justify-center bento-large">bento-large</div> <div class="well flex items-center justify-center bento-tall">bento-tall</div> <div class="well flex items-center justify-center">One cell</div> <div class="well flex items-center justify-center">One cell</div> <div class="well flex items-center justify-center bento-wide">bento-wide</div> <div class="well flex items-center justify-center">One cell</div> <div class="well flex items-center justify-center">One cell</div> <div class="well flex items-center justify-center bento-full">bento-full</div></div><div className="bento p-lg bg-surface-base fg-text-muted text-2xl font-mono" style={{ '--bento-row': '5rem' } as React.CSSProperties}> <div className="well flex items-center justify-center bento-large">bento-large</div> <div className="well flex items-center justify-center bento-tall">bento-tall</div> <div className="well flex items-center justify-center">One cell</div> <div className="well flex items-center justify-center">One cell</div> <div className="well flex items-center justify-center bento-wide">bento-wide</div> <div className="well flex items-center justify-center">One cell</div> <div className="well flex items-center justify-center">One cell</div> <div className="well flex items-center justify-center bento-full">bento-full</div></div><div class="bento p-lg bg-surface-base fg-text-muted text-2xl font-mono" style="--bento-row: 5rem"> <div class="well flex items-center justify-center bento-large">bento-large</div> <div class="well flex items-center justify-center bento-tall">bento-tall</div> <div class="well flex items-center justify-center">One cell</div> <div class="well flex items-center justify-center">One cell</div> <div class="well flex items-center justify-center bento-wide">bento-wide</div> <div class="well flex items-center justify-center">One cell</div> <div class="well flex items-center justify-center">One cell</div> <div class="well flex items-center justify-center bento-full">bento-full</div></div><template> <div class="bento p-lg bg-surface-base fg-text-muted text-2xl font-mono" style="--bento-row: 5rem"> <div class="well flex items-center justify-center bento-large">bento-large</div> <div class="well flex items-center justify-center bento-tall">bento-tall</div> <div class="well flex items-center justify-center">One cell</div> <div class="well flex items-center justify-center">One cell</div> <div class="well flex items-center justify-center bento-wide">bento-wide</div> <div class="well flex items-center justify-center">One cell</div> <div class="well flex items-center justify-center">One cell</div> <div class="well flex items-center justify-center bento-full">bento-full</div> </div></template>몇몇 타일만 확장하세요. 모든 타일이 크면 타일 크기만 큰 자동 그리드와 같고, 큰 타일이 하나도 없으면 먼저 눈에 띄는 항목이 없습니다.
#배치 순서
타일은 마크업 순서대로 앞 타일 뒤에서 자신이 들어갈 수 있는 첫 위치에 배치됩니다. 넓은 타일이 행 끝에 들어가지 않으면 다음 행에서 시작하므로 앞 행에 빈칸이 남습니다. 그리드는 뒤에 오는 타일을 그 빈칸으로 옮기지 않습니다. 키보드 탐색과 스크린 리더는 마크업 순서를 따르므로, 타일을 옮기면 화면에 보이는 순서와 읽는 순서가 달라집니다.
타일이 빈틈없이 배치되도록 마크업 순서를 정하세요. 로고 모음이나 사진 모음처럼 순서에 의미가 없다면 bento-dense를 사용해 뒤에 오는 타일로 앞의 빈칸을 채울 수 있습니다.
배치 순서
<div class="flex flex-col gap-md w-full fg-text-muted text-sm"> <p class="eyebrow">bento</p> <div class="bento" style="--bento-row: 3rem"> <div class="well flex items-center justify-center">1</div> <div class="well flex items-center justify-center bento-wide">2</div> <div class="well flex items-center justify-center bento-wide">3</div> <div class="well flex items-center justify-center">4</div> <div class="well flex items-center justify-center">5</div> </div> <p class="eyebrow">bento bento-dense</p> <div class="bento bento-dense" style="--bento-row: 3rem"> <div class="well flex items-center justify-center">1</div> <div class="well flex items-center justify-center bento-wide">2</div> <div class="well flex items-center justify-center bento-wide">3</div> <div class="well flex items-center justify-center">4</div> <div class="well flex items-center justify-center">5</div> </div></div><div className="flex flex-col gap-md w-full fg-text-muted text-sm"> <p className="eyebrow">bento</p> <div className="bento" style={{ '--bento-row': '3rem' } as React.CSSProperties}> <div className="well flex items-center justify-center">1</div> <div className="well flex items-center justify-center bento-wide">2</div> <div className="well flex items-center justify-center bento-wide">3</div> <div className="well flex items-center justify-center">4</div> <div className="well flex items-center justify-center">5</div> </div> <p className="eyebrow">bento bento-dense</p> <div className="bento bento-dense" style={{ '--bento-row': '3rem' } as React.CSSProperties}> <div className="well flex items-center justify-center">1</div> <div className="well flex items-center justify-center bento-wide">2</div> <div className="well flex items-center justify-center bento-wide">3</div> <div className="well flex items-center justify-center">4</div> <div className="well flex items-center justify-center">5</div> </div></div><div class="flex flex-col gap-md w-full fg-text-muted text-sm"> <p class="eyebrow">bento</p> <div class="bento" style="--bento-row: 3rem"> <div class="well flex items-center justify-center">1</div> <div class="well flex items-center justify-center bento-wide">2</div> <div class="well flex items-center justify-center bento-wide">3</div> <div class="well flex items-center justify-center">4</div> <div class="well flex items-center justify-center">5</div> </div> <p class="eyebrow">bento bento-dense</p> <div class="bento bento-dense" style="--bento-row: 3rem"> <div class="well flex items-center justify-center">1</div> <div class="well flex items-center justify-center bento-wide">2</div> <div class="well flex items-center justify-center bento-wide">3</div> <div class="well flex items-center justify-center">4</div> <div class="well flex items-center justify-center">5</div> </div></div><template> <div class="flex flex-col gap-md w-full fg-text-muted text-sm"> <p class="eyebrow">bento</p> <div class="bento" style="--bento-row: 3rem"> <div class="well flex items-center justify-center">1</div> <div class="well flex items-center justify-center bento-wide">2</div> <div class="well flex items-center justify-center bento-wide">3</div> <div class="well flex items-center justify-center">4</div> <div class="well flex items-center justify-center">5</div> </div> <p class="eyebrow">bento bento-dense</p> <div class="bento bento-dense" style="--bento-row: 3rem"> <div class="well flex items-center justify-center">1</div> <div class="well flex items-center justify-center bento-wide">2</div> <div class="well flex items-center justify-center bento-wide">3</div> <div class="well flex items-center justify-center">4</div> <div class="well flex items-center justify-center">5</div> </div> </div></template>첫 번째 벤토에서는 넓은 타일이 첫 타일 뒤에 빈칸을 남깁니다. 두 번째 벤토에서는 네 번째 타일이 그 빈칸을 채웁니다. 화면에서는 두 번째로 보이지만 읽는 순서에서는 여전히 네 번째입니다.
#행
--bento-row는 행의 최소 높이이며 기본값은 10rem입니다. 텍스트가 많은 타일은 행을 더 높이고, 옆 타일도 같은 높이로 늘어나므로 행의 콘텐츠가 잘리지 않습니다. 수치나 한 줄짜리 텍스트를 담는 타일은 행의 최소 높이를 낮추고, 이미지를 담는 타일은 높이세요. 이 페이지의 다이어그램에서는 행의 최소 높이를 5rem으로 설정했습니다.
--bento-gap은 타일 사이의 간격이며 값은 1rem입니다. 열 개수를 계산할 때 이 값이 필요하므로 간격 유틸리티 대신 사용자 지정 속성으로 지정합니다.
#사용 기준
| 타일 구성 | 적합한 레이아웃 |
|---|---|
| 크기가 여러 가지이고 일부 타일을 강조하는 구성 | 벤토 |
| 타일 개수와 관계없이 크기가 모두 같은 구성 | 자동 그리드 |
| 갤러리처럼 콘텐츠에 따라 타일마다 높이가 다른 구성 | 메이슨리 |
| 디자인에서 열 개수를 정해 둔 구성 | grid grid-cols(3) 및 grid-col-span(2)을 컨테이너 변형과 함께 사용 |
벤토는 타일 6~10개를 한 번 배치해 두는 구성에 적합합니다. 프로젝트 목록이나 검색 결과처럼 항목이 계속 늘어나는 모음은 특정 타일을 우선할 이유가 없으므로 자동 그리드가 적합합니다.
#접근성
- 읽는 순서와 키보드 탐색 순서는 모두 마크업을 따릅니다. 가장 중요한 타일을 먼저 작성하고,
bento-dense는 순서에 의미가 없는 모음에만 사용하세요. - 스크린 리더는 크기로 표현한 강조를 전달하지 않습니다. 큰 타일에는 읽는 사람에게 가장 필요한 제목을 붙이고, 각 타일의 제목에 내용을 명확히 드러내 제목 목록만 읽어도 전체 구성을 파악할 수 있게 하세요.
- 타일 전체가 하나의 링크라면 카드의 링크 요소 자체에
card-interactive를 적용하세요. 카드 위에 링크를 늘려 덮는 방식은 피하세요.
#클래스
| 클래스 | 설명 |
|---|---|
bento | 그리드 자체 너비가 48rem 이상이면 4열, 28rem 이상 48rem 미만이면 2열, 28rem 미만이면 1열이며, 각 행의 최소 높이는 --bento-row입니다. 이름이 bento인 크기 컨테이너이며, 자체적으로 표시되는 요소는 없습니다. |
bento-dense | 뒤에 오는 타일이 위로 이동해 앞선 타일이 여러 칸을 차지하면서 남긴 빈칸을 채웁니다. 화면에 보이는 순서와 읽기 순서가 달라지므로 항목 순서에 의미가 없는 경우에만 사용합니다.적용할 클래스는 bento입니다 |
bento-wide | bento 너비가 28rem 이상일 때 2열을 차지하는 타일. 그리드가 2열이면 한 행 전체를 채웁니다. |
bento-tall | bento 너비가 28rem 이상일 때 2행을 차지하는 타일 |
bento-large | bento 너비가 28rem 이상일 때 2열과 2행을 차지하는 타일 |
bento-full | 너비에 관계없이 한 행 전체를 차지하는 타일 |
#사용자 지정 속성
| 속성 | 기본값 | 설명 |
|---|---|---|
--bento-row | 10rem | 행의 최소 높이입니다. 행은 내부에서 가장 높은 요소에 맞춰 늘어납니다. |
--bento-gap | 1rem | 열 개수를 계산할 때 사용하는 타일 사이 간격 |
#관련 항목
- 자동 그리드그리드가 주어진 공간에 들어갈 수 있는 같은 너비의 열 수를 직접 정합니다.
- 메이슨리높이가 제각각인 타일을 아래에 빈 공간이 생기지 않도록 열에 촘촘히 배치합니다.
- 카드카드에 주어진 공간에 따라 내부 배치가 달라지는, 살짝 떠 있는 시트입니다.
- 지표수치 하나와 측정 항목, 그 변화를 보여 줍니다. 차분한 레이블, 큰 값, 변화량으로 이루어집니다.
- 차트어떤 너비에도 맞는 하나의 SVG에 꺾은선 차트부터 선버스트 차트까지 20가지가 넘는 형태로 수치를 그립니다.
- 표면모든 컴포넌트의 바탕이 되는 트레이, 볼록한 표면, 오목한 영역의 높이 체계입니다.