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

glassmorphism

Skill này làm gì

Tạo hiệu ứng “kính mờ” trực quan cho giao diện ứng dụng hoặc website. Nó làm nền phía sau một phần tử hơi mờ và trong suốt, như nhìn qua kính.

Khi nào nên dùng

  • ✓Khi bạn muốn một diện mạo hiện đại và thanh lịch.
  • ✓Khi bạn muốn làm nổi bật một phần tử trên nền màu sắc hoặc hình ảnh.
  • ✓Khi bạn hướng đến thẩm mỹ lấy cảm hứng từ macOS.

Liên kết skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/design-it/glassmorphism/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/glassmorphism/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 một nút có hiệu ứng kính mờ trên nền gradient xanh dương và tím.”

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 làm mờ những gì nằm sau phần tử và làm nó trong suốt một phần. Giống như nhìn qua cửa sổ mờ sươ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.

Glassmorphism

"Looking through a frosted window. Interfaces that blend seamlessly with vibrant backgrounds."

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. Background Blur (Backdrop Filter): The defining characteristic. Elements blur whatever is underneath them.
  2. Semi-transparent White/Dark Backgrounds: Panels use rgba() colors to let the background shine through.
  3. Subtle Light Borders: A 1px semi-transparent white (or light) border to simulate the glass edge catching the light.

Visual DNA

  • Colors: Requires a vibrant or textured background to work (e.g., gradients, abstract meshes, or photos). Works beautifully over Yacht Club or Earth-Grounded Elegance if there is underlying visual texture.
  • Typography: Clean, geometric sans-serifs. High contrast text (pure white or pure black) is required for legibility against the glass.
  • Shadows: Soft, subtle drop shadows to detach the glass pane from the background.

Web Implementation

  • Rely heavily on backdrop-filter: blur().
  • CSS Example:
body {
  /* Requires a complex background to see the glass effect */
  background: url('abstract-mesh.jpg') cover; 
}

.glass-panel {
  background: rgba(255, 255, 255, 0.15); /* Light glass */
  /* OR background: rgba(0, 0, 0, 0.25); for Dark glass */
  
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  
  border: 1px solid rgba(255, 255, 255, 0.3); /* The glass edge */
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  
  padding: 32px;
}

App Implementation

SwiftUI

struct GlassCard: View {
    var body: some View {
        ZStack {
            // Vibrant background required for glass to show
            LinearGradient(
                colors: [.purple, .blue, .cyan],
                startPoint: .topLeading,
                endPoint: .bottomTrailing
            )
            .ignoresSafeArea()
            
            // Glass panel
            VStack(alignment: .leading, spacing: 16) {
                Text("Glass Panel")
                    .font(.system(size: 22, weight: .semibold))
                    .foregroundColor(.white)
                Text("Content floating on frosted glass.")
                    .font(.system(size: 15))
                    .foregroundColor(.white.opacity(0.8))
                
                Button(action: {}) {
                    Text("Continue")
                        .font(.system(size: 15, weight: .semibold))
                        .foregroundColor(.white)
                        .padding(.horizontal, 24)
                        .padding(.vertical, 12)
                        .background(.ultraThinMaterial)
                        .cornerRadius(8)
                }
            }
            .padding(24)
            .background(.ultraThinMaterial)  // Built-in frosted glass
            .cornerRadius(16)
            .overlay(
                RoundedRectangle(cornerRadius: 16)
                    .stroke(.white.opacity(0.3), lineWidth: 1) // Glass edge highlight
            )
            .shadow(color: .black.opacity(0.1), radius: 20, x: 0, y: 10)
            .padding(24)
        }
    }
}
  • Use .ultraThinMaterial, .thinMaterial, .regularMaterial, .thickMaterial — Apple built glassmorphism natively.
  • Add .overlay(RoundedRectangle().stroke(.white.opacity(0.3))) for the light edge catch.
  • Glass only works if there's a vibrant background visible behind it.

Flutter

class GlassCard extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Stack(
      children: [
        // Vibrant background
        Container(
          decoration: const BoxDecoration(
            gradient: LinearGradient(
              colors: [Colors.purple, Colors.blue, Colors.cyan],
              begin: Alignment.topLeft,
              end: Alignment.bottomRight,
            ),
          ),
        ),
        // Glass panel
        Center(
          child: ClipRRect(
            borderRadius: BorderRadius.circular(16),
            child: BackdropFilter(
              filter: ImageFilter.blur(sigmaX: 16, sigmaY: 16),
              child: Container(
                padding: const EdgeInsets.all(24),
                decoration: BoxDecoration(

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

Hiệu ứng này có cần nền nhiều chi tiết để hoạt động không?

Có, hiệu ứng kính mờ trông đẹp nhất khi phía sau có nền nhiều màu, gradient hoặc hình ảnh thú vị.

Tôi có thể dùng ở đâu cũng được không?

Đây là một phong cách thiết kế, nên có thể áp dụng cho nút, bảng, thẻ hoặc bất kỳ phần tử nào cần vẻ ngoài riêng biệt.

Có khó triển khai không?

Triển khai cần mã cụ thể (CSS cho web, hoặc SwiftUI/Flutter cho ứng dụng), nhưng ý tưởng là tạo độ mờ và độ trong suốt.

Chi tiết

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

Web and App implementation guide for Glassmorphism. Trigger when user wants a frosted glass effect, blurred backgrounds, transparency, or a sleek MacOS-like feel.

repo: sickn33/agentic-awesome-skills

Độ phổ biến

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