Chuyển đến nội dung
Skillpedia
Website và giao diện (frontend)48k · #5912

swiftui-liquid-glass

Skill này làm gì

Công cụ này giúp tạo hoặc xem xét các phần của ứng dụng di động dùng hiệu ứng thị giác gọi là “Liquid Glass”. Hiệu ứng này làm các thành phần trên màn hình có diện mạo kính mờ hiện đại.

Khi nào nên dùng

  • ✓Khi bạn muốn ứng dụng có diện mạo hiện đại và sang trọng.
  • ✓Khi tạo nút hoặc khu vực cần nổi bật về mặt thị giác.
  • ✓Để đảm bảo hiệu ứng kính hoạt động tốt trên các phiên bản hệ điều hành khác nhau.

Liên kết skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/swiftui-liquid-glass/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/swiftui-liquid-glass/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, đổi màu khi được nhấn.”

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

Cách hoạt động

Công cụ dùng các lệnh hệ thống cụ thể để áp dụng hiệu ứng kính. Nó cũng kiểm tra xem hiệu ứng có tương thích với các phiên bản hệ điều hành cũ hơn không, và cung cấp phương án thay thế về mặt thị giác.

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.

SwiftUI Liquid Glass

Overview

Use this skill to build or review SwiftUI features that fully align with the iOS 26+ Liquid Glass API. Prioritize native APIs (glassEffect, GlassEffectContainer, glass button styles) and Apple design guidance. Keep usage consistent, interactive where needed, and performance aware.

When to Use

  • When the user wants to adopt or review Liquid Glass in SwiftUI UI.
  • When you need correct API usage, fallback handling, or modifier ordering for Liquid Glass.

Workflow Decision Tree

Choose the path that matches the request:

1) Review an existing feature

  • Inspect where Liquid Glass should be used and where it should not.
  • Verify correct modifier order, shape usage, and container placement.
  • Check for iOS 26+ availability handling and sensible fallbacks.

2) Improve a feature using Liquid Glass

  • Identify target components for glass treatment (surfaces, chips, buttons, cards).
  • Refactor to use GlassEffectContainer where multiple glass elements appear.
  • Introduce interactive glass only for tappable or focusable elements.

3) Implement a new feature using Liquid Glass

  • Design the glass surfaces and interactions first (shape, prominence, grouping).
  • Add glass modifiers after layout/appearance modifiers.
  • Add morphing transitions only when the view hierarchy changes with animation.

Core Guidelines

  • Prefer native Liquid Glass APIs over custom blurs.
  • Use GlassEffectContainer when multiple glass elements coexist.
  • Apply .glassEffect(...) after layout and visual modifiers.
  • Use .interactive() for elements that respond to touch/pointer.
  • Keep shapes consistent across related elements for a cohesive look.
  • Gate with #available(iOS 26, *) and provide a non-glass fallback.

Review Checklist

  • Availability: #available(iOS 26, *) present with fallback UI.
  • Composition: Multiple glass views wrapped in GlassEffectContainer.
  • Modifier order: glassEffect applied after layout/appearance modifiers.
  • Interactivity: interactive() only where user interaction exists.
  • Transitions: glassEffectID used with @Namespace for morphing.
  • Consistency: Shapes, tinting, and spacing align across the feature.

Implementation Checklist

  • Define target elements and desired glass prominence.
  • Wrap grouped glass elements in GlassEffectContainer and tune spacing.
  • Use .glassEffect(.regular.tint(...).interactive(), in: .rect(cornerRadius: ...)) as needed.
  • Use .buttonStyle(.glass) / .buttonStyle(.glassProminent) for actions.
  • Add morphing transitions with glassEffectID when hierarchy changes.
  • Provide fallback materials and visuals for earlier iOS versions.

Quick Snippets

Use these patterns directly and tailor shapes/tints/spacing.

if #available(iOS 26, *) {
    Text("Hello")
        .padding()
        .glassEffect(.regular.interactive(), in: .rect(cornerRadius: 16))
} else {
    Text("Hello")
        .padding()
        .background(.ultraThinMaterial, in: RoundedRectangle(cornerRadius: 16))
}
GlassEffectContainer(spacing: 24) {
    HStack(spacing: 24) {
        Image(systemName: "scribble.variable")
            .frame(width: 72, height: 72)
            .font(.system(size: 32))
            .glassEffect()
        Image(systemName: "eraser.fill")
            .frame(width: 72, height: 72)
            .font(.system(size: 32))
            .glassEffect()
    }
}
Button("Confirm") { }
    .buttonStyle(.glassProminent)

Resources

  • Reference guide: references/liquid-glass.md
  • Prefer Apple docs for up-to-date API details.

Limitations

  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Câu hỏi thường gặp

“Liquid Glass” là gì?

Đây là hiệu ứng thị giác cho ứng dụng, mô phỏng vẻ ngoài của kính mờ, mang lại nét hiện đại và tinh tế cho thiết kế.

Tôi có cần biết lập trình để dùng không?

Không, bạn chỉ cần mô tả điều mình muốn, và công cụ (hoặc AI dùng nó) sẽ xử lý các chi tiết kỹ thuật.

Hiệu ứng có hoạt động trên mọi điện thoại không?

Công cụ hướng đến việc hiệu ứng hoạt động trên các phiên bản hệ điều hành mới (iOS 26 trở lên) và cung cấp phương án thay thế cho phiên bản cũ hơn, để ứng dụng giữ được diện mạo của nó.

Chi tiết

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

Implement or review SwiftUI Liquid Glass APIs with correct fallbacks and modifier order.

repo: sickn33/agentic-awesome-skills

Độ phổ biến

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