Styledex
← Index

Bento Grid

便当盒布局

stylekitMITDashboard · dashboardProfessional · professionalRegional · regionalLight and dark · bothMedium · mediumNeutral · neutralMuted · mutedSerif · serifGeneral · general

灵感源于日式便当盒的不规则网格布局,通过大小不一的卡片组合创造视觉层次,常用于作品集和产品展示。

NNorthwind
Product · Pricing
Specimen
Make the work feel finished

One interface, dressed in this style. Compare type, color, radius, and density.

128
Active
4.8
Score
12ms
Edge

Attribution

"Bento Grid" from https://github.com/AnxForever/stylekit (MIT). © AnxForever. api/styles/bento-grid @ bfa7da909e86.

https://github.com/AnxForever/stylekit · api/styles/bento-grid · bfa7da909e86 · © AnxForever

Do

  • 使用 CSS Grid 布局 grid grid-cols-4
  • 卡片跨越多行或多列 col-span-2, row-span-2
  • 保持一致的间隙 gap-4 或 gap-6
  • 使用圆角 rounded-xl 或 rounded-2xl
  • 大卡片放置主要内容,小卡片放置次要信息
  • 使用 aspect-ratio 保持卡片比例
  • 悬停时平滑上浮 + 微放大 hover:-translate-y-1 hover:scale-[1.01]
  • 悬停时阴影从紧凑变宽广(shadow-sm -> shadow-xl)

Don't

  • 禁止所有卡片大小相同(失去 Bento 特色)
  • 禁止间隙不一致
  • 禁止卡片过于拥挤无留白
  • 禁止忽略响应式适配
  • 禁止在卡片内堆砌过多内容
  • 禁止使用直角(需要圆角)

Prompt

Showcase 6 core product features using Bento Grid style with the following requirements:
1. Use CSS Grid to create an irregular grid layout
2. Featured items span col-span-2 or row-span-2
3. Each card contains: icon, title, short description
4. Cards on hover: -translate-y-1 + scale-[1.01] + shadow spread
5. Inner icons on group-hover: color change or scale-110
6. Responsive: single column on mobile, multi-column on desktop
All cards rounded-2xl, consistent gap-4

---
"Bento Grid" from https://github.com/AnxForever/stylekit (MIT). © AnxForever. api/styles/bento-grid @ bfa7da909e86.
powered by Styledex — https://styledex.dev

Tokens

DTCG

{
  "$schema": "https://www.designtokens.org/schemas/2025.10/format.json",
  "$description": "Bento Grid. \"Bento Grid\" from https://github.com/AnxForever/stylekit (MIT). © AnxForever. api/styles/bento-grid @ bfa7da909e86.",
  "$extensions": {
    "dev.styledex": {
      "id": "stylekit-bento-grid",
      "license": "MIT",
      "attribution": "\"Bento Grid\" from https://github.com/AnxForever/stylekit (MIT). © AnxForever. api/styles/bento-grid @ bfa7da909e86.",
      "banner": "powered by Styledex — https://styledex.dev"
    }
  },
  "color": {
    "background": {
      "$type": "color",
      "$value": "#ffffff"
    },
    "foreground": {
      "$type": "color",
      "$value": "#18181b"
    },
    "card": {
      "$type": "color",
      "$value": "#ffffff"
    },
    "card-foreground": {
      "$type": "color",
      "$value": "#18181b"
    },
    "primary": {
      "$type": "color",
      "$value": "#18181b"
    },
    "primary-foreground": {
      "$type": "color",
      "$value": "#fafaf9"
    },
    "secondary": {
      "$type": "color",
      "$value": "#fafafa"
    },
    "secondary-foreground": {
      "$type": "color",
      "$value": "#18181b"
    },
    "accent": {
      "$type": "color",
      "$value": "#3b82f6"
    },
    "accent-foreground": {
      "$type": "color",
      "$value": "#fafaf9"
    },
    "muted": {
      "$type": "color",
      "$value": "#f0f0f0"
    },
    "muted-foreground": {
      "$type": "color",
      "$value": "#69696b"
    },
    "border": {
      "$type": "color",
      "$value": "#dbdbdb"
    },
    "destructive": {
      "$type": "color",
      "$value": "#dc2626"
    },
    "ring": {
      "$type": "color",
      "$value": "#18181b"
    }
  },
  "font": {
    "sans": {
      "$type": "fontFamily",
      "$value": [
        "ui-sans-serif",
        "system-ui",
        "sans-serif"
      ]
    },
    "serif": {
      "$type": "fontFamily",
      "$value": [
        "ui-serif",
        "Georgia",
        "serif"
      ]
    },
    "mono": {
      "$type": "fontFamily",
      "$value": [
        "ui-monospace",
        "SFMono-Regular",
        "Menlo",
        "monospace"
      ]
    }
  },
  "radius": {
    "base": {
      "$type": "dimension",
      "$value": "0.5rem"
    }
  },
  "spacing": {
    "base": {
      "$type": "dimension",
      "$value": "1rem"
    }
  },
  "shadow": {
    "base": {
      "$type": "shadow",
      "$value": "0 1px 2px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.04)"
    }
  }
}

CSS

/* powered by Styledex — https://styledex.dev */
/* "Bento Grid" from https://github.com/AnxForever/stylekit (MIT). © AnxForever. api/styles/bento-grid @ bfa7da909e86. */
:root {
  --background: #ffffff;
  --foreground: #18181b;
  --card: #ffffff;
  --card-foreground: #18181b;
  --primary: #18181b;
  --primary-foreground: #fafaf9;
  --secondary: #fafafa;
  --secondary-foreground: #18181b;
  --accent: #3b82f6;
  --accent-foreground: #fafaf9;
  --muted: #f0f0f0;
  --muted-foreground: #69696b;
  --border: #dbdbdb;
  --destructive: #dc2626;
  --ring: #18181b;
  --radius: 0.5rem;
  --font-sans: ui-sans-serif, system-ui, sans-serif;
  --font-serif: ui-serif, Georgia, serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --spacing: 1rem;
  --shadow: 0 1px 2px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.04);
}

Tailwind

/* powered by Styledex — https://styledex.dev */
/* "Bento Grid" from https://github.com/AnxForever/stylekit (MIT). © AnxForever. api/styles/bento-grid @ bfa7da909e86. */
/** Tailwind theme extend for Bento Grid (stylekit-bento-grid) */
module.exports = {
  "theme": {
    "extend": {
      "colors": {
        "background": "#ffffff",
        "foreground": "#18181b",
        "card": "#ffffff",
        "primary": "#18181b",
        "primary-foreground": "#fafaf9",
        "secondary": "#fafafa",
        "accent": "#3b82f6",
        "muted": "#f0f0f0",
        "border": "#dbdbdb",
        "destructive": "#dc2626",
        "ring": "#18181b"
      },
      "borderRadius": {
        "lg": "0.5rem"
      },
      "fontFamily": {
        "sans": [
          "ui-sans-serif",
          "system-ui",
          "sans-serif"
        ],
        "serif": [
          "ui-serif",
          "Georgia",
          "serif"
        ],
        "mono": [
          "ui-monospace",
          "SFMono-Regular",
          "Menlo",
          "monospace"
        ]
      },
      "boxShadow": {
        "styledex": "0 1px 2px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.04)"
      }
    }
  }
};

shadcn

/* powered by Styledex — https://styledex.dev */
/* "Bento Grid" from https://github.com/AnxForever/stylekit (MIT). © AnxForever. api/styles/bento-grid @ bfa7da909e86. */
@layer base {
:root {
  --background: #ffffff;
  --foreground: #18181b;
  --card: #ffffff;
  --card-foreground: #18181b;
  --primary: #18181b;
  --primary-foreground: #fafaf9;
  --secondary: #fafafa;
  --secondary-foreground: #18181b;
  --accent: #3b82f6;
  --accent-foreground: #fafaf9;
  --muted: #f0f0f0;
  --muted-foreground: #69696b;
  --border: #dbdbdb;
  --destructive: #dc2626;
  --ring: #18181b;
  --radius: 0.5rem;
  --font-sans: ui-sans-serif, system-ui, sans-serif;
  --font-serif: ui-serif, Georgia, serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --spacing: 1rem;
  --shadow: 0 1px 2px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.04);
}
}