StyleKit

Bento Grid

便当盒布局

Rate this style

Irregular grid layout inspired by Japanese bento boxes, creating visual hierarchy through varied card sizes. Commonly used for portfolios and product showcases.

bento gridbento layoutbento box designcard gridmodular layoutCSS gridfeature gridportfolio gridproduct showcasedashboard cards

Best For

bento grid / bento layout / bento box design

Primary Move

Use CSS Grid layout grid grid-cols-4

Watch Out

Do not make all cards the same size (loses Bento character)

design.md

Bento Grid as a design document

One document describes the colour roles, type rules, spacing and component construction behind this style. Copy or download it into Claude Code or Codex.

Document view

Bento Grid — Style Reference

Uneven cards on one shared grid, ranking themselves by size rather than by color.

Theme: light

Bento treats the page as a four-column grid where cards span one column, two columns or two rows, and size itself is the hierarchy: the largest cell holds the main feature, the smallest the footnote. Gaps must stay uniform (16px or 24px) or the grid falls apart. Cards share a 24px radius, a hairline border and a shadow you can barely see; hover lifts 4px, scales 1% and widens the shadow to 0 8px 30px, like lifting a real box. A few cards may carry a gradient as a visual anchor, never more than two per screen.

Colors

NameValueTokenRole
Ink#18181b--color-inkHeadings, primary buttons and the dark anchor card — the contrast baseline for the whole grid.
Snow#fafafa--color-snowPage canvas. Cards sit one step brighter so luminance does the lifting.
Card White#ffffff--color-cardEvery card fill. No grey cards; level is decided by size and content alone.
Sky#3b82f6--color-skyPrimary emphasis and icon grounds, used on one anchor card or one icon set.
Violet#8b5cf6--color-violetSecond accent, appearing only beside sky inside a gradient anchor card.
Tangerine#f97316--color-tangerineFigures and alerts. One per screen, placed in a small cell.

Typography

Inter — The only face: 600 for card titles, 700 for section titles, 400 for body.
  • Substitute: system-ui, -apple-system, 'Segoe UI', sans-serif
  • Weights: 400, 500, 600, 700
  • Sizes: 12, 14, 16, 24, 32
  • Line height: 1.15 (display), 1.25 (headings), 1.6 (body)
  • Letter spacing: -0.02em on display, 0.02em on uppercase labels
Type Scale
RoleFamilyWeightSizeLine HeightLetter SpacingToken
display—70032px1.15-0.02em--text-display
heading—60024px1.25—--text-heading
body-lg—50016px1.5—--text-body-lg
body—40014px1.6—--text-body
label—50012px1.40.02em--text-label

Spacing & Layout

Base unit: 8px Density: comfortable

Spacing Scale
NameValueToken
88px--spacing-8
1616px--spacing-16
2424px--spacing-24
3232px--spacing-32
4848px--spacing-48
6464px--spacing-64
9696px--spacing-96
Border Radius
ElementValue
cards24px
buttons12px
inputs12px
icons16px
  • Page max-width: 1152px
  • Section gap: 64px
  • Card padding: 24px
  • Element gap: 16px

Components

Bento Cell

Role: Any single card in the grid

White fill, 24px radius, 1px #f4f4f5 border, 24px padding (32px in large cells), shadow 0 2px 10px at 2%. Cells default to one column and may span two columns or two rows. Hover lifts 4px, scales 1.01 and widens the shadow to 0 8px 30px at 8%, over 300ms ease-out.

  • Sizes: 1x1, 2x1, 2x2; padding 24px or 32px
  • States: hover: lift 4px, scale 1.01, shadow widens
Anchor Card

Role: The main feature cell, usually 2x2

Ink fill or a 135-degree sky-to-violet gradient, white text, 32px padding. Title at 24px/600, body at 14px in 80% white. The icon tile is 48px square with a 16px radius on 12% white. Hover carries a tinted shadow (30% sky) and lifts 4px. One per screen.

Bento Grid Container

Role: Page-level grid container

One column on mobile, two on tablet, four on desktop; gaps are a single value per page, 16px or 24px. Rows use grid-auto-rows pinned to multiples of 180px so spanning cards keep their proportions.

Bento Tile Action

Role: Buttons and links inside a cell

Ink fill, white text, 12px radius, 14px type at weight 500, 8px 18px padding, one shadow step. Hover shifts to 80% ink and lifts 2px; press scales to 0.95. Inside a dark card, invert to a white fill with ink text.

Do's and Don'ts

Do
  • Card sizes must differ; size is the hierarchy
  • One gap value for the whole page
  • Keep radius at 24px; never mix 12px and 32px
  • Hover lifts 4px and scales 1% within 300ms
  • One anchor card per screen — gradient or ink, not both
  • Collapse to a single column on mobile, preserving order
Don't
  • Never make every card the same size
  • Do not mix two gap values on one page
  • No sharp corners
  • No hard offset shadows — that belongs to neo-brutalist
  • No more than three content blocks inside one cell
  • Never leave a row with a single card

Surfaces

LevelNameValuePurpose
0Snow#fafafa页面画布
1Card White#ffffff标准卡片
2Ink Anchor#18181b主功能卡,全屏不超过一张

Elevation

  • Card rest: 0 2px 10px rgba(0,0,0,0.02)
  • Card hover: 0 8px 30px rgba(0,0,0,0.08)
  • Anchor card hover: 0 12px 40px rgba(59,130,246,0.30)

Imagery

Cells hold product shots, small charts, icon grids and short loops. One anchor card may substitute a gradient for imagery. No large people photography or decorative illustration — both break the grid.

Layout

Four columns capped at 1152px, gaps of 16px or 24px, rows based on 180px. Spans must pair up: a 2x2 needs at least two 1x1 neighbours so no row is a single card. On mobile the grid collapses to a single ordered column with the same gap and padding.

Agent Prompt Guide

Implementation Contract
  • Use the requested page, user task and real content as the brief. Implement only the requested scope; identify missing business information instead of inventing data or capabilities.
  • Inspect the current project, stack and components first. Reuse its structure, routes, dependencies and components; do not rebuild unrelated pages or features.
  • Use the project's breakpoints to adapt columns and spacing for narrow and desktop screens. Preserve hierarchy and prevent accidental horizontal overflow.
  • For interactions in scope, support keyboard focus and reduced motion, with applicable disabled, loading, empty and error states.
  • Run the project's existing checks after implementation. Report only tests and visual checks actually run, and list unverified behavior.

QUICK COLOR REFERENCE:

  • text: #18181b
  • background: #fafafa
  • card: #ffffff
  • accent: #3b82f6
  • secondary: #8b5cf6
  • border: #f4f4f5

EXAMPLE COMPONENT PROMPTS:

  1. Build a bento grid: four columns on desktop, 16px gaps, rows based on 180px. The first card spans 2x2 with an ink fill, white text, 32px padding and a 24px radius; the rest are white cards on 24px radii with a 1px #f4f4f5 border and 24px padding. Every card lifts 4px on hover, scales 1.01 and expands its shadow from 0 2px 10px rgba(0,0,0,0.02) to 0 8px 30px rgba(0,0,0,0.08), over 300ms ease-out.

Similar Brands

  • Apple — Same unequal card grid, though Apple is more restrained and rarely colours the cells
  • Linear — Organises information by cell size and whitespace rather than ornament

Quick Start


:root {
  /* Colors */
  --color-ink: #18181b;
  --color-snow: #fafafa;
  --color-card: #ffffff;
  --color-sky: #3b82f6;
  --color-violet: #8b5cf6;
  --color-tangerine: #f97316;

  /* Typography — Font Families */
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Typography — Scale */
  --text-display: 32px;
  --leading-display: 1.15;
  --tracking-display: -0.02em;
  --text-heading: 24px;
  --leading-heading: 1.25;
  --text-body-lg: 16px;
  --leading-body-lg: 1.5;
  --text-body: 14px;
  --leading-body: 1.6;
  --text-label: 12px;
  --leading-label: 1.4;
  --tracking-label: 0.02em;

  /* Typography — Weights */
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* Spacing */
  --spacing-unit: 8px;
  --spacing-8: 8px;
  --spacing-16: 16px;
  --spacing-24: 24px;
  --spacing-32: 32px;
  --spacing-48: 48px;
  --spacing-64: 64px;
  --spacing-96: 96px;

  /* Layout */
  --page-max-width: 1152px;
  --section-gap: 64px;
  --card-padding: 24px;
  --element-gap: 16px;
  --density: comfortable;

  /* Border Radius */
  --radius-cards: 24px;
  --radius-buttons: 12px;
  --radius-inputs: 12px;
  --radius-icons: 16px;

  /* Surfaces */
  --surface-snow: #fafafa;
  --surface-card-white: #ffffff;
  --surface-ink-anchor: #18181b;
}

Community

Ratings & Feedback

No ratings yet - be the firstSign in to rate

Loading comments…

Component Templates

Component Preview

Button

FAQ

Bento Grid — Frequently Asked Questions

What is the Bento Grid design style?
Irregular grid layout inspired by Japanese bento boxes, creating visual hierarchy through varied card sizes. Commonly used for portfolios and product showcases. Its core principle: Bento Grid is a modern layout style inspired by the compartmentalized design of Japanese bento boxes.
What colors does Bento Grid use?
Bento Grid uses #18181b as its primary color and #fafafa as its secondary color, with accent colors #3b82f6, #8b5cf6, #ec4899, #f97316. Every hex value can be copied from the palette on this page.
How do I apply Bento Grid correctly?
Key practices: Use CSS Grid layout grid grid-cols-4. Cards span multiple rows or columns col-span-2, row-span-2. Maintain consistent gaps gap-4 or gap-6.
What are common mistakes with Bento Grid?
Avoid: Do not make all cards the same size (loses Bento character). Do not use inconsistent gaps. Do not overcrowd cards without whitespace.
How do I prompt AI to generate Bento Grid UI?
Copy the ready-made AI prompt on this page — it bundles the design tokens and component rules — and paste it into ChatGPT, Claude, Claude Code, or Codex. Effective prompts include the keywords: bento grid, bento layout, bento box design, card grid.
Global Styles

Global CSS

css
/* Bento Grid 全局样式 */

/* 基础 Grid 容器 */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

@media (max-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .bento-grid {
    grid-template-columns: 1fr;
  }
}

/* 卡片尺寸变体 */
.bento-lg {
  grid-column: span 2;
  grid-row: span 2;
}

.bento-wide {
  grid-column: span 2;
}

.bento-tall {
  grid-row: span 2;
}

/* Widget 卡片悬停 */
.bento-card {
  transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
  cursor: pointer;
}

.bento-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.bento-card:active {
  transform: scale(0.98);
}

/* 卡片内图标联动 */
.bento-card:hover .bento-icon {
  transform: scale(1.1);
}

.bento-icon {
  transition: transform 0.3s ease-out, background-color 0.3s ease-out, color 0.3s ease-out;
}
/* Bento Grid Design Tokens */
:root {
  --bento-grid-primary: #18181b;
  --bento-grid-secondary: #fafafa;
  --bento-grid-accent: #3b82f6;
  --bento-grid-glow: rgba(24, 24, 27, 0.3);
}

@keyframes bento-grid-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes bento-grid-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.bento-grid-card {
  position: relative;
  overflow: hidden;
}

.bento-grid-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: linear-gradient(135deg, rgba(24, 24, 27, 0.05), transparent);
  pointer-events: none;
}

.bento-grid-card:hover::before {
  opacity: 1;
}

.bento-grid-gradient {
  background: linear-gradient(135deg, #18181b, #3b82f6);
}

.bento-grid-gradient-text {
  background: linear-gradient(135deg, #18181b, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bento-grid-frosted {
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  background: rgba(24, 24, 27, 0.08);
}

.bento-grid-accent-corner {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 2rem), calc(100% - 2rem) 100%, 0 100%);
}

.bento-grid-animate-in {
  animation: bento-grid-fade-in 0.5s ease-out both;
}

Compatible Visual Styles

Try Pairing

Bento Grid is a layout pattern that can be paired with the following visual styles.

Related Styles

Related Styles

Explore these styles for ready-made tokens and components.

Bento Grid and Dashboard Layout sit closest to each other. The table below gives the real differences in color, use case, and tags, so the choice between them is made on facts.

AttributeBento GridDashboard Layout
Primary color#18181b#111827
Secondary color#fafafa#f9fafb
Best forbento grid / bento layout / bento box designdashboard / dashboard layout / admin panel
Unique tags——
Design Philosophy

Bento Grid is a modern layout style inspired by the compartmentalized design of Japanese bento boxes. Through combining cards of different sizes within a grid, it creates visual effects that are both orderly and varied.