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

card-based-design

Skill này làm gì

Hướng dẫn này giải thích cách tạo bố cục với các “thẻ” trực quan, giống như trên Pinterest. Mỗi thẻ gom các phần thông tin nhỏ, rời rạc, như hình ảnh, tiêu đề và mô tả.

Khi nào nên dùng

  • ✓Khi bạn muốn sắp xếp thông tin thành các khối trực quan dễ đọc.
  • ✓Khi tạo luồng tin tức hoặc thư viện sản phẩm.
  • ✓Khi bạn muốn trình bày nội dung thành từng phần nhỏ, như trong ứng dụng công thức nấu ăn.

Liên kết skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/design-it/card-based-design/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/card-based-design/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 bố cục thẻ để hiển thị các công thức nấu ăn?”

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

Cách hoạt động

Hệ thống sắp xếp nội dung thành các hộp riêng (thẻ) có thể điều chỉnh theo các kích thước màn hình khác nhau. Mỗi thẻ có viền bo tròn và bóng đổ để nổi bật.

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.

Card-Based Design

"Bite-sized consumption. Encapsulating discrete pieces of information into distinct visual containers."

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. Encapsulation: Every card is self-contained. It has an image, a title, a short description, and usually an action (like a button or a 'like' icon).
  2. Responsive Flow: Cards easily reflow on different screen sizes (from a 4-column grid on desktop to a single column on mobile).
  3. Clear Boundaries: Cards must visually pop off the background.

Visual DNA

  • Colors: Very flexible. The background should be slightly darker or distinct from the card color. Sophisticated Neutral works well for a premium feel.
  • Typography: Clear hierarchy within the card (Header, Subheader, Body).
  • Styling: Standard border-radius: 8px and a medium drop shadow.

Web Implementation

  • CSS Grid with auto-fit or a Masonry layout.
  • CSS Example:
body {
  background-color: #f0f2f5; /* Standard app background */
  padding: 40px;
}

.card-grid {
  display: grid;
  /* Auto-responsive magic */
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.card {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden; /* Keep images inside the rounded corners */
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 1px solid #eee;
}

.card-content {
  padding: 20px;
  flex-grow: 1; /* Pushes footer to the bottom */
}

.card-footer {
  padding: 16px 20px;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: space-between;
}

App Implementation

SwiftUI

struct ContentCard: View {
    var body: some View {
        VStack(alignment: .leading, spacing: 0) {
            // Image Area
            Rectangle()
                .fill(Color.gray.opacity(0.2))
                .frame(height: 160)
            
            // Content Area
            VStack(alignment: .leading, spacing: 8) {
                Text("Card Title")
                    .font(.headline)
                Text("A brief description of the content inside this discrete card container.")
                    .font(.subheadline)
                    .foregroundColor(.secondary)
                    .lineLimit(2)
            }
            .padding(16)
        }
        .background(Color.white)
        .cornerRadius(12)
        // Clean, subtle drop shadow
        .shadow(color: Color.black.opacity(0.08), radius: 12, x: 0, y: 4)
    }
}

// In your view:
// LazyVGrid(columns: [GridItem(.adaptive(minimum: 160), spacing: 16)]) { ... }
  • VStack inside a background with .cornerRadius and .shadow is the standard.
  • Use LazyVGrid with .adaptive(minimum: 160) to automatically create a multi-column card grid that flows perfectly on iPad or iPhone.

Flutter

class ContentCard extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Card(
      elevation: 4, // Handles shadow natively
      shadowColor: Colors.black.withOpacity(0.4),
      shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
      clipBehavior: Clip.antiAlias, // Critical: stops images from bleeding over corners
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        mainAxisSize: MainAxisSize.min,
        children: [
          // Image Area
          Container(
            height: 160,
            color: Colors.grey[300],
            width: double.infinity,
          ),
          // Content Area
          Padding(
            padding: const EdgeInsets.all(16.0),
            child: Column(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: const [
                Text('Card Title', style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18)),
                SizedBox(height: 8),
                Text(
                  'A brief description of the content inside this discrete card container.',
                  style: TextStyle(color: Colors.black54),
                  maxLines: 2,

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

“Thẻ” là gì?

Đó là một hộp trực quan chứa một phần thông tin, như hình ảnh, tiêu đề và đoạn văn ngắn. Hãy nghĩ đến các bài đăng trên Pinterest.

Vì sao dùng thẻ?

Thẻ giúp nội dung có tổ chức hơn, dễ quét mắt và hấp dẫn về mặt thị giác, thích ứng tốt với mọi thiết bị.

Thẻ thích ứng với các màn hình khác nhau thế nào?

Thẻ tự động sắp xếp lại, hiển thị nhiều cột hơn trên màn hình lớn và một cột trên điện thoại di động.

Chi tiết

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

Web and App implementation guide for Card-Based Design. Trigger when user wants information cards, Pinterest-style layouts, and bite-sized content containers.

repo: sickn33/agentic-awesome-skills

Độ phổ biến

Sao GitHub
48k
Vị trí xếp hạng
#4384
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ự