HomeStylesTemplates
StyleKit
StylesTemplates
  1. Home
  2. /Styles
  3. /Bento Grid
Style Catalog/便当盒布局

便当盒布局

Bento Grid

A
95/100Excellent

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

网格卡片不规则作品集现代moderncontemporarysleek简洁bento
View Full Showcase →Templates

Best For

网格 / 卡片 / 不规则

Primary Move

Use CSS Grid layout grid grid-cols-4

Watch Out

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

Showcase Entry

Live preview of the showcase page. Click to explore the full experience.

View Full Showcase →

Color Palette

Primary

#18181b

Secondary

#fafafa

Accent 1

#3b82f6

Accent 2

#8b5cf6

Accent 3

#ec4899

Accent 4

#f97316

AI ImplementationComponent PreviewReadinessExportsRatings & Feedback

AI Implementation

Copy the Hard Prompt first, then use the spec when needed

Use the Hard Prompt by default to generate UI. Use the Design Spec to understand, modify, and review the style. Use the Creative Brief for early exploration.

Hard Prompt

Use this by default: copy it, append the concrete requirement, and let AI generate consistent production UI.

When to use

  • -When AI should generate UI directly
  • -When repeated outputs must stay consistent
  • -When style drift is the main risk

How to use

  • -Copy the full prompt
  • -Append the concrete requirement
  • -Review against forbidden rules and UI states
STYLEKIT_STYLE_REFERENCE
style_name: Bento Grid
style_slug: bento-grid
style_source: /styles/bento-grid

# Hard Prompt

## When To Use
Use this when you want AI to generate code with strict style consistency. It is the safest default for production UI.

## How To Use
- Copy the full prompt into ChatGPT, Claude, Cursor, or another coding assistant.
- Append the concrete product/page requirement after the prompt.
- After generation, check the forbidden rules and interaction states before accepting the output.

Strictly follow the style rules below and maintain consistency. No style drift allowed.

## Requirements
- Prioritize style consistency first, then creative extension.
- When conflicts arise, treat prohibitions as the highest priority.
- Self-check before output: verify colors, typography, spacing, and interactions still match this style.

## Style Rules
You are a Bento Grid design style frontend development expert. All generated code must strictly follow these constraints:

## Absolutely Forbidden

- All cards being the same size (must have size variation)
- Ignoring responsive adaptation
- Inconsistent gaps between cards
- Overcrowded card content
- Using sharp corners (rounded corners required)
- Using hard-edge shadows (shadow-[Xpx_Ypx_0px])

## Must Follow

- Use CSS Grid: grid grid-cols-4
- Card spanning: col-span-2, row-span-2
- Consistent gaps: gap-4 or gap-6
- Rounded corners: rounded-xl, rounded-2xl, rounded-3xl
- Responsive: md:grid-cols-2, lg:grid-cols-4

## Animation & Interaction Rules

- Widget Feel: Each card feels like an independent iOS widget. Smooth hover lift + micro-scale (hover:-translate-y-1 hover:scale-[1.01]), with soft wide shadow (hover:shadow-[0_8px_30px_rgba(0,0,0,0.08)]).
- Micro-interactions: Card inner icons respond independently on group-hover: color swap (bg swap), scale up (scale-110).
- Snappy Easing: Use ease-out with duration-200 to duration-300, making interactions responsive and modern.
- Active Feedback: Press with active:scale-95 or active:scale-98, simulating physical press.
- Smooth Focus: Input focus ring transition is ultra-smooth (transition-all duration-200).

## Layout Rules

Large cards (col-span-2 row-span-2):
- Place primary content or featured functions
- Can use gradient backgrounds
- Recommend 1-2 cards

Medium cards (col-span-2 or row-span-2):
- Secondary important content
- Recommend 2-3 cards

Small cards (1x1):
- Icons, numbers, tags and other brief content
- Fill remaining space

## Color Suggestions

Backgrounds:
- Gradient: bg-gradient-to-br from-blue-500 to-purple-600
- Light: bg-zinc-50, bg-zinc-100
- Colored: bg-orange-50, bg-green-50, bg-blue-50

Text:
- Primary: text-zinc-900
- Secondary: text-zinc-500, text-zinc-600
- White: text-white (on dark backgrounds)

## Self-Check

After generating code, verify:
1. Cards have varying sizes
2. Uses CSS Grid
3. Consistent gaps
4. Has responsive handling
5. Unified rounded corners
6. Cards have hover lift + micro-scale effect
7. Inner icons have group-hover linkage

Component Templates

Component Preview

按钮

Bento 风格按钮,微上浮 + 阴影扩散

Frontend Readiness

Dark Mode, States, Motion, and Accessibility

This layer tracks whether the style is ready for real websites: theme modes, state feedback, keyboard access, and performance constraints.

Overall

73%

Curated

Dark Mode

70%

Partial

UI States

85%

Partial

Motion

70%

Partial

A11y

70%

Partial

Performance

70%

Partial

Key State Coverage

light / dark
HoverFocus VisibleDisabledLoadingEmptyErrorSuccess

Button

Default / Hover / Focus Visible / Active / Disabled

Input

Default / Hover / Focus Visible / Disabled / Error

Card

Default / Hover / Focus Visible / Loading / Skeleton

Form

Default / Focus Visible / Disabled / Loading / Error

Implementation Notes

  • Give each tile a stable surface role in dark mode; avoid random dark tints.
  • Check contrast in both light and dark modes.
  • Use explicit aspect ratios for every tile and media block.
  • Masonry-like responsive tiles can cause layout shift if media dimensions are not fixed.
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

便当盒布局 is a layout pattern that can be paired with the following visual styles.

Liquid Glass

Liquid Glass

新野兽派

Neo-Brutalist

编辑杂志风

Editorial

新拟物派

Neumorphism

IDE Integration

IDE Configuration Export

Download configuration files for AI coding assistants to generate code in this style.

Style Pack

Export Style Pack

Get complete machine-readable style assets including design tokens, Tailwind presets, CSS variables, and shadcn/ui themes.

Metadata

Style metadata including version information

Design Tokens

Compatible with Figma / Style Dictionary / Tokens Studio

Tailwind Preset

Tailwind CSS theme preset, import directly in config

Global CSS

CSS variables and base styles

shadcn Theme

shadcn/ui theme configuration

CSS Variables

Pure CSS variables, works with any project

SKILL.md

Loadable skill pack for Cursor / Claude Code / VS Code

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.

Accessibility

Accessibility Score

WCAG 2.1 compliance analysis based on color contrast and typography readability.

95

Overall Score

Grade: A - Excellent

Contrast Ratios

Score: 100/100Average Ratio: 17.72:1
AA PassAAA Pass
ContextColorsRatioAAAAA
Button primary
/#ffffff / #18181b
17.72:1

Readability

Score

82/100

Font Size

text-sm md:text-base

Font Weight

font-semibold text-zinc-900 dark:text-zinc-100

Line Height

default

Scoring is based on WCAG 2.1 standards. AA requires 4.5:1 contrast for normal text, 3:1 for large text; AAA requires 7:1 for normal text, 4.5:1 for large text.

Design Recipes

Recommended Combinations with Bento Grid

These curated recipes combine this style with layouts and animations, optimized for specific use cases.

Modern SaaS Glass

Premium glass effects with bento grid layout. Perfect for AI/tech products.

liquid-glassbento-grid+3
moderneleganthigh-conversion

Pixel Art Style

8-bit charm for games and nostalgic projects.

pixel-artbento-grid+2
retroplayfulcreative

StyleKit

A curated web design style library to help AI generate better-looking websites.

Navigation

StylesTemplatesGuideBlogChangelog

Resources

UI Design PromptsLanding Page PromptsDashboard PromptsTailwind UI PromptsDark Mode UI PromptsGitHub Repository

Stay Updated

By subscribing, you agree to our Privacy Policy and Terms.


Support Maintenance

If StyleKit helps your workflow, voluntary support helps cover servers, domains, and ongoing upkeep.

Scan to support / View all options

(c) 2026 StyleKit. Open source project.

AboutContactPrivacyTermsBuilt with the Editorial style
Stylekit前端样式库stylekit.top陕ICP备2025065501号-3