跳到正文
Skillpedia
界面(UI/UX)48k · #4381

bento-ui

它能做什么

本指南讲解如何创建看起来像便当盒(Bento box)的用户界面。这种界面的布局被分成一个个带圆角的区块,有点像苹果的视觉风格。

适用场景

  • ✓当你想让网站或应用看起来现代且井然有序时。
  • ✓如果你喜欢区块清晰、边界分明的界面。
  • ✓想要制作一种高端风格的仪表盘或控制面板时。

技能链接

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/design-it/bento-ui/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/design-it/bento-ui/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我该怎么做一个像便当盒一样分区排列的页面?”

每周 5 个新技能,1 分钟读完。

工作原理

它使用网格结构(类似棋盘)来定位各个区块。每个区块都有圆角,区块之间保持一致的间距。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Bento UI

"Everything in its right place. A highly structured, modular grid of distinct compartments."

When to Use

Use this sub-style when the user's request matches the aesthetic described above. This is a child reference of the design-it skill and is not meant to be triggered directly.

Core Principles

  1. Strict Grid Structure: The entire UI is built on a responsive, multi-column grid (usually 3x3, 4x4, or irregular masonry).
  2. Rounded Compartments: Every distinct piece of content lives inside a card (compartment) with consistent, usually large, border-radius.
  3. Equal Spacing: The gap between compartments must be perfectly consistent everywhere.

Visual DNA

  • Colors: Highly adaptable, but looks incredibly premium with Minimalist Slate or Yacht Club. Often uses a slightly off-white or light gray background to make the white compartments pop.
  • Typography: Apple-esque (e.g., SF Pro, Inter). Headlines are usually bold and placed at the top-left or bottom-left of each compartment.
  • Visuals: Often relies on high-quality, edge-to-edge images or single, large 3D icons inside specific grid cells to break up text-heavy cards.

Web Implementation

  • CSS Grid is mandatory. Flexbox is too difficult to maintain the strict 2D structure.
  • CSS Example:
.bento-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  gap: 24px;
  padding: 24px;
  background-color: var(--bg-primary); /* Slightly darker than cards */
}

.bento-card {
  background-color: #fff;
  border-radius: 32px; /* Very large border radius */
  padding: 32px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.04);
  /* Optional: subtle 1px border for crispness */
  border: 1px solid rgba(0,0,0,0.05);
  
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Creating spans for different bento sizes */
.bento-span-2 { grid-column: span 2; }
.bento-span-2-row { grid-row: span 2; }
.bento-large { grid-column: span 2; grid-row: span 2; }

App Implementation

SwiftUI

struct BentoGrid: View {
    let columns = [
        GridItem(.flexible(), spacing: 16),
        GridItem(.flexible(), spacing: 16)
    ]
    
    var body: some View {
        ScrollView {
            LazyVGrid(columns: columns, spacing: 16) {
                // 2x1 Span (Full width)
                BentoCard(title: "Hero", color: .blue)
                    .frame(height: 180)
                
                // 1x1 Spans
                BentoCard(title: "Stats", color: .green)
                    .frame(height: 180)
                BentoCard(title: "Graph", color: .purple)
                    .frame(height: 180)
                
                // 1x2 Span (Tall)
                BentoCard(title: "Activity", color: .orange)
                    .frame(height: 376) // (180 * 2) + 16 spacing
                
                // 1x1 Spans next to the tall one
                VStack(spacing: 16) {
                    BentoCard(title: "A", color: .pink).frame(height: 180)
                    BentoCard(title: "B", color: .cyan).frame(height: 180)
                }
            }
            .padding(16)
        }
        .background(Color(.systemGroupedBackground))
    }
}

struct BentoCard: View {
    let title: String
    let color: Color
    var body: some View {
        RoundedRectangle(cornerRadius: 24)
            .fill(Color(.secondarySystemGroupedBackground))
            .overlay(
                Text(title).font(.headline).foregroundColor(color),
                alignment: .topLeading
            )
            .padding(16)
            // Soft bento shadow
            .shadow(color: .black.opacity(0.04), radius: 12, x: 0, y: 4)
    }
}
  • Use LazyVGrid for uniform grids.
  • For complex irregular bento layouts (like 1x2 spans), you often have to mix VStack and HStack inside the grid cells to fake the spans.
  • Maintain absolute consistency with cornerRadius (usually 24-32pt) and spacing (usually 16pt).

Flutter

import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';

class BentoScreen extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.grey[100],
      body: SingleChildScrollView(
        padding: const EdgeInsets.all(16),
        child: StaggeredGrid.count(
          crossAxisCount: 4, // 4 columns total
          mainAxisSpacing: 16,

…
常见问题

什么是“Bento UI”?

它是一种用户界面设计风格,把内容组织成网格中的一个个区块(或称“隔间”)。可以想象成带隔板的日式便当盒。

它有哪些主要特点?

网格划分清晰、区块带有圆角,并且区块之间的间距保持一致。

我需要会编程才能使用它吗?

本指南会展示如何用代码(CSS、SwiftUI、Flutter)实现它,但这种设计理念也可以在可视化工具中应用。

详情

作者的原始描述

Web and App implementation guide for Bento UI. Trigger when user wants modular grid cards, Apple-like dashboard style, or sections arranged like a bento box.

repo: sickn33/agentic-awesome-skills

热度

GitHub 星标
48k
排名
#4381
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能