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

layered-design

Skill này làm gì

Tạo giao diện nơi các phần tử chồng lên nhau có chủ ý, như các lớp lơ lửng, để tạo chiều sâu. Giống như xếp các tờ giấy chồng lên nhau, nhưng có tổ chức và thú vị về mặt thị giác.

Khi nào nên dùng

  • ✓Khi bạn muốn một phần tử (như chữ hoặc hình ảnh) nằm trên một phần tử khác.
  • ✓Khi muốn tạo hiệu ứng chiều sâu hoặc 3D trên website hoặc ứng dụng.
  • ✓Khi bạn muốn phá vỡ vẻ cứng nhắc của lưới và có nhiều tự do thị giác hơn.

Liên kết skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/design-it/layered-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/layered-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

“Tạo thiết kế trong đó tiêu đề chính nằm trên một ảnh nền, và một thẻ chữ nhỏ lơ lửng phía trên ảnh.”

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

Cách hoạt động

Điều này đạt được bằng kỹ thuật lập trình cho phép đặt các phần tử chồng lên nhau, như những lá bài. Mỗi lớp được xử lý riêng và có thể có bóng đổ hoặc viền để 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.

Layered Design

"Stacking context. Interfaces built from overlapping, independent layers."

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. Explicit Overlap: Elements intentionally overlap each other to break the grid and show depth.
  2. Clear Stratification: Every layer must be visually distinct via shadow, border, or contrasting color.
  3. Parallax Scrolling: Background layers move slower than foreground layers during interaction/scrolling.

Visual DNA

  • Colors: Monochromatic Brown or Sophisticated Neutral. Layering works best when the background is distinct from the floating elements.
  • Typography: Often large, overlapping text that spans across image and background layers.
  • Spacing: Negative space is required around overlapping elements so they don't feel cluttered.

Web Implementation

  • Heavy use of position: absolute, negative margins, and z-index.
  • CSS Example:
.layer-container {
  position: relative;
  padding: 100px;
}

.layer-bg-image {
  position: absolute;
  top: 0; right: 0;
  width: 60%;
  height: 400px;
  object-fit: cover;
  z-index: 1;
}

.layer-text-box {
  position: relative;
  z-index: 2; /* Sits above the image */
  background: white;
  padding: 40px;
  width: 50%;
  margin-top: 200px; /* Pulls it down over the image */
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  /* Optional: border to define edge */
  border-left: 4px solid var(--cta-highlight);
}

App Implementation

SwiftUI

struct LayeredDesignView: View {
    var body: some View {
        ScrollView {
            ZStack(alignment: .top) {
                // Background Image Layer (Back)
                Image("architectural-bg")
                    .resizable()
                    .aspectRatio(contentMode: .fill)
                    .frame(height: 400)
                    .offset(x: 40, y: 0) // Shifted right
                    .zIndex(1)
                
                // Content Card Layer (Front)
                VStack(alignment: .leading, spacing: 16) {
                    Text("Stacking Context")
                        .font(.largeTitle).bold()
                    Text("This card intentionally overlaps the background image to create depth without relying on a grid.")
                        .foregroundColor(.secondary)
                }
                .padding(40)
                .background(Color.white)
                .shadow(color: Color.black.opacity(0.1), radius: 30, y: 20)
                .offset(x: -40, y: 200) // Shifted left and pulled down
                .zIndex(2)
            }
            .padding(.bottom, 200) // Account for the offset
        }
    }
}
  • ZStack is the foundation of layered design in SwiftUI.
  • Use .offset() to intentionally break the alignment and create overlapping compositions.
  • Explicitly set .zIndex() if your offsets might cause unexpected paint orders.

Flutter

class LayeredDesignScreen extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: SingleChildScrollView(
        child: SizedBox(
          height: 600, // Fixed height stack or use constraints
          child: Stack(
            children: [
              // Background Image Layer
              Positioned(
                top: 0,
                right: -40, // Shifted offscreen right
                width: MediaQuery.of(context).size.width * 0.8,
                height: 400,
                child: Image.asset('assets/architectural-bg.jpg', fit: BoxFit.cover),
              ),
              
              // Content Card Layer
              Positioned(
                top: 250, // Overlaps the bottom of the image
                left: 20, // Overlaps the left of the image
                width: MediaQuery.of(context).size.width * 0.7,
                child: Container(
                  padding: const EdgeInsets.all(40),
                  decoration: BoxDecoration(
                    color: Colors.white,
                    boxShadow: [
                      BoxShadow(color: Colors.black.withOpacity(0.1), blurRadius: 30, offset: const Offset(0, 20))
                    ],
                  ),
                  child: Column(
                    crossAxisAlignment: CrossAxisAlignment.start,

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

Vì sao dùng các lớp chồng lên nhau?

Để tạo diện mạo động và hiện đại hơn, mang lại chiều sâu và làm nổi bật các phần tử quan trọng.

Việc này có làm website chậm không?

Không nhất thiết. Nếu triển khai tốt, hiệu ứng chỉ mang tính thị giác và không ảnh hưởng hiệu suất. Điều quan trọng là các phần tử chồng lên nhau một cách có chủ ý và có tổ chức.

Tôi có cần là nhà thiết kế giàu kinh nghiệm để dùng cái này không?

Không, ý tưởng rất đơn giản: các phần tử chồng lên nhau. Công cụ lập trình giúp kiểm soát cách và vị trí chồng lên nhau.

Chi tiết

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

Web and App implementation guide for Layered Design. Trigger when user wants multiple depth levels, floating panels, and overlapping content.

repo: sickn33/agentic-awesome-skills

Độ phổ biến

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