Chuyển đến nội dung
Skillpedia
Giao diện (UI/UX)48k · #4381

bento-ui

Skill này làm gì

Hướng dẫn này giải thích cách tạo giao diện người dùng trông giống hộp bento. Đây là các bố cục được chia thành khối với góc bo tròn, gợi nhớ đến phong cách thị giác của Apple.

Khi nào nên dùng

  • ✓Khi bạn muốn một diện mạo hiện đại và gọn gàng cho website hoặc ứng dụng.
  • ✓Khi bạn thích giao diện có các khối rõ ràng, được xác định tốt.
  • ✓Khi bạn muốn tạo bảng điều khiển hoặc trang quản lý theo phong cách cao cấp.

Liên kết skill

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

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/design-it/bento-ui/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Làm thế nào để tạo một trang với các khối được tổ chức như hộp bento?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Nó dùng cấu trúc lưới (như bàn cờ) để sắp xếp các khối. Mỗi khối có góc bo tròn và khoảng cách đồng đều giữa chúng.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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,

…
Câu hỏi thường gặp

“Bento UI” là gì?

Đó là phong cách thiết kế giao diện tổ chức nội dung thành các khối (hoặc “ngăn”) trong một lưới. Hãy nghĩ đến hộp cơm bento của Nhật với các ngăn chia.

Đặc điểm chính là gì?

Một lưới rõ ràng, các khối có góc bo tròn và khoảng cách đồng đều giữa chúng.

Tôi có cần biết lập trình để dùng hướng dẫn này không?

Hướng dẫn này chỉ cách triển khai bằng mã (CSS, SwiftUI, Flutter), nhưng ý tưởng thiết kế cũng có thể áp dụng trong các công cụ thiết kế trực quan.

Chi tiết

Mô tả gốc của tác giả

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

Độ phổ biến

Sao GitHub
48k
Vị trí xếp hạng
#4381
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự