Prisma

Nghiên Cứu: iOS 26 Liquid Glass — Radius / Gap / Padding / Sizing

Date: 2026-03-12 Status: 📋 RESEARCH — Phân tích hệ thống spacing iOS 26 & đánh giá áp dụng cho Prisma Builds on: density-apple-android-comparison.md


1. iOS 26: Cái Gì Thực Sự Thay Đổi?

1.1 Liquid Glass — Tổng quan

iOS 26 (WWDC 2025) giới thiệu Liquid Glass, visual overhaul lớn nhất từ iOS 7:

Khía cạnh iOS 17 (Prisma hiện tại) iOS 26 (Liquid Glass)
Material Flat / Frosted blur Translucent glass — phản chiếu & khúc xạ
Corner style Fixed radius per component Concentric shapes — radius adapts to context
Controls Rectangular bars Floating elements — capsule-shaped
Navigation Static tab bar / nav bar Floating nav — shrink/expand on scroll
Depth Subtle shadows Layered glass + dynamic light/shadow
Spacing Tight (16pt default) More spacious — users report "excessive padding"

[!IMPORTANT] iOS 26 thay đổi triết lý spacing — từ "compact and dense" sang "airy and floating". Padding tăng đáng kể, elements có nhiều không gian thở hơn.

1.2 Ba loại Shape mới

Shape Type Mô tả Radius logic Dùng cho
Fixed Radius cố định, không phụ thuộc container Hardcoded value Layouts ổn định, predictable
Capsule Radius = height / 2 — luôn bo tròn maximum radius = height / 2 Buttons, pills, tags, nav items — primary choice iOS 26
Concentric Radius tự tính dựa trên parent — đảm bảo inner/outer cùng center R_inner = R_outer − padding Cards trong cards, grouped lists, sheets

1.3 Concentric Radius Formula

text
R_outer = R_inner + Padding

╔═══════════════════════════════════╗
║  Outer container (R=20)          ║
║  ┌───────────────────────────┐   ║
║  │  Inner content (R=12)     │   ║  ← padding = 8
║  │                           │   ║  → R_inner = 20 - 8 = 12 ✓
║  └───────────────────────────┘   ║
╚═══════════════════════════════════╝

Đây là thay đổi lớn nhất ảnh hưởng đến Prisma: radius không còn là giá trị tĩnh, mà liên kết trực tiếp với padding.


2. Metric Cụ Thể iOS 26

2.1 Component Sizing (pt = points)

Component iOS 17 iOS 26 Thay đổi
Tab bar 49pt 68pt ↑ +19pt — floating glass
Tab bar top edge 46pt from top Mới
Nav bar 44pt (tappable) ~44pt (floating glass) Visual khác, size tương tự
Button (min tap) 44×44pt 44×44pt Giữ nguyên
Button (comfortable) ~50pt ~50pt+ Capsule shape → trông lớn hơn
Text field 44pt height ~44pt+ Rounded corners lớn hơn
List row 44pt 44pt+ Spacious hơn

2.2 Spacing Values (Gathered from HIG + Community)

Metric iOS 17 iOS 26 Trend
Screen margin 16pt (iPhone) / 20pt (iPad) 16–20pt (vẫn vậy) ≈ Giữ nguyên
Card padding 16pt 16pt+ ≈ hoặc ↑
Section spacing 35pt (grouped) / 18pt (inset) Tăng
Form field spacing 16pt 16pt+
Inter-component 8pt 8pt+
Min tap target 44×44pt 44×44pt =
Grid base 8pt (convention) 8pt =

2.3 Corner Radius Values

Level iOS 17 (~convention) iOS 26 (Liquid Glass) Prisma iOS 17 Token
Device screen 39pt (iPhone 15) 39pt (hardware)
Sheet/Full modal ~device radius Concentric: 39 - padding page: 16px (mobile)
Card / Dialog 10–12pt 12–16pt (more rounded) group: 12px ✅
Button / Input 8–10pt (fixed) Capsule (height/2) 或 10–12pt comp: 8px ⚠️
Grouped list section 10pt ~13pt (more rounded) section: 16px ✓
Chip / Badge 6–8pt Capsule (height/2)
Toggle / Small Capsule Capsule
Segmented control ~8pt Capsule (fully rounded)

3. Đánh Giá: Prisma Hiện Tại vs iOS 26

3.1 Radius — Gap Analysis

Prisma Token Prisma Mobile Value iOS 26 Expected Match? Action
page.radius-default --radius-md (16px) Concentric from device (~25-30px for sheets) ⚠️ Thấp Tăng hoặc thêm concentric calc
section.radius-default --radius-md (16px) ~13pt ✅ OK (lớn hơn chút) Giữ nguyên
group.radius-default --radius-sm (12px) ~12–16pt ✅ OK Giữ nguyên
comp.radius --radius-xs (8px) Capsule (height/2 ≈ 22px) hoặc 10–12pt fixed 🔴 Quá nhỏ Nâng lên hoặc thêm capsule

[!CAUTION] Capsule radius là thay đổi lớn nhất: iOS 26 prefer capsule shape cho buttons/inputs, nghĩa là border-radius: 9999px (full pill). Prisma comp.radius = 8px không match.

3.2 Padding — Gap Analysis

Prisma Token Mobile Value iOS 26 Expected Match?
page.padding-default ×4 = 16px 16–20pt ✅ OK
page.margin-default ×4 = 16px 16pt ✅ OK
section.padding-default ×4 = 16px 16pt+ ✅ OK
group.padding-default ×4 = 16px 16pt+ ✅ OK
comp.padding-default ×3 = 12px 12–16pt ⚠️ Borderline
comp.padding-small ×2 = 8px 8pt+ ⚠️ Tight

3.3 Sizing — Gap Analysis

Concept Prisma Hiện Tại iOS 26 Expected Gap?
touch-target-min 44px 44pt ✅ Match
comp.height-* Không có Button: ~44–50pt, Input: ~44pt 🔴 Thiếu
Tab bar height Không define 68pt 🔴 Thiếu
Nav bar height Không define ~44pt floating 🔴 Thiếu

3.4 Tính năng iOS 26 mà Prisma thiếu

Feature Mô tả Prisma có? Priority
Concentric radius calc R_inner = R_outer - padding 🔴 High
Capsule shape border-radius: 9999px for interactive 🔴 High
Floating nav metrics Tab bar 68pt, floating offset 🟡 Medium
Glass effect spacing Morphing threshold khi elements gần nhau 🟢 Low (native only)
More spacious defaults Padding tăng ~20% tổng thể ⚠️ Partial 🟡 Medium

4. Đề Xuất: Prisma Áp Dụng iOS 26

Plan A: Incremental Updates ← ⭐ Khuyến nghị

Thêm tokens mới, giữ backward compatible.

4A.1 Thêm Capsule Radius Token
json
// Thêm vào mobile.tokens.json
{
    "comp": {
        "radius": { "$value": "var(--radius-xs)", "$description": "8px — fixed small" },
        "radius-capsule": { "$value": "9999px", "$description": "Capsule/pill — iOS 26 primary button shape" },
        "radius-fixed": { "$value": "var(--radius-sm)", "$description": "12px — iOS 26 fixed shape for inputs" }
    }
}

Kết quả: Dev chọn giữa comp.radius (fixed nhỏ), comp.radius-fixed (fixed lớn hơn, iOS 26 aligned), hoặc comp.radius-capsule (pill shape).

4A.2 Thêm Concentric Radius Calc
css
/* CSS approach — calc inner radius từ outer */
:root {
    --radius-concentric: calc(var(--group-radius-default) - var(--group-padding-default));
    /* Ví dụ: 12px - 16px = -4px → clamp to 0 */
    /* Cần clamp: max(0px, calc(outer - padding)) */
}

/* Token approach */
.card {
    border-radius: var(--group-radius-default);  /* outer: 12px */
    padding: var(--group-padding-default);        /* 16px */
}
.card > .button {
    /* Concentric: inner = max(0, outer - padding) */
    border-radius: max(0px, calc(var(--group-radius-default) - var(--group-padding-default)));
}

[!NOTE] Concentric radius trong CSS cần max() function để tránh negative values. Trường hợp padding > radius → inner radius = 0. Hoàn toàn khả thi với CSS.

4A.3 Nâng Comp Radius Default
Token Hiện tại Đề xuất Lý do
comp.radius (mobile) --radius-xs (8px) --radius-sm (12px) iOS 26 fixed shape = 10–12pt
comp.radius (web) --radius-sm (12px) Giữ 12px Đã match
4A.4 Tăng Spacing Nhẹ (iOS 26 "airy" feel)
Token Mobile Hiện tại Đề xuất Mobile Lý do
comp.padding-default ×3 = 12px ×4 = 16px iOS 26 chuộng spacious hơn
comp.stack-gap-default ×1 = 4px ×2 = 8px iOS 26 form spacing tăng
section.stack-gap-default ×4 = 16px ×5 = 20px Section breathing room
4A.5 Thêm Layout Component Tokens
json
{
    "layout": {
        "tab-bar-height": { "$value": "68px", "$description": "iOS 26 floating tab bar" },
        "nav-bar-height": { "$value": "44px", "$description": "iOS 26 floating nav bar" },
        "safe-area-bottom": { "$value": "34px", "$description": "iPhone home indicator" }
    }
}

Plan B: iOS 26 Style Mode — ⭐⭐ Tham vọng hơn

Tạo một style JSON mới ios26.json riêng, giống cách đã có ios17.json:

text
design-system/tokens/styles/
├── ios17.json       ← hiện tại
├── ios26.json       ← MỚI — Liquid Glass palette + radius overrides
├── material.json
└── shadcn.json

ios26.json sẽ chứa:

  • Liquid Glass colors (translucent fills, glass tints)
  • Capsule radius defaults
  • Concentric radius CSS custom properties
  • Increased padding values
  • Updated component heights (tab bar 68pt, etc.)

Pros:

  • Không breaking change — chỉ thêm option
  • Dev chọn data-brand="ios26" để activate
  • Có thể A/B test iOS 17 vs iOS 26 look

Cons:

  • Cần thời gian build
  • Glass effect khó simulate perfectly bằng CSS (blur + refraction)

Plan C: Density × Style Intersection

Kết hợp density token với style token:

text
ios26 style + mobile density = app mode iOS 26
ios26 style + web density = web mode iOS 26

Yêu cầu: density tokens phải tương thích với ios26 radius logic. Hiện tại chưa — cần thêm capsule/concentric tokens vào density layer.


5. So Sánh Tổng Hợp: iOS 17 → iOS 26 → Prisma

5.1 Radius Comparison

Context iOS 17 iOS 26 Prisma Mobile Prisma Web Action
Screen-level 39pt (device) 39pt 16px 24px Tăng mobile lên 20–24px
Sheet/Modal ~device Concentric (39-padding) 16px 24px Thêm concentric calc
Card 10–12pt 12–16pt 12px ✅ 16px ✅ OK
Button 8–10pt fixed Capsule (9999px) 8px ⚠️ 12px ⚠️ Thêm capsule token
Input 8–10pt 10–12pt fixed 8px ⚠️ 12px ✅ Nâng mobile comp radius
Chip/Tag 6–8pt Capsule Thêm capsule token

5.2 Padding Comparison

Context iOS 17 iOS 26 Prisma Mobile Prisma Web Action
Screen margin 16pt 16–20pt 16px ✅ 24px ✅ OK
Card internal 16pt 16pt+ 16px ✅ 24px ✅ OK
Component 12–16pt 16pt+ 12px ⚠️ 16px ✅ Xem xét nâng mobile
Form gap 16pt 16pt+ 4px 🔴 8px ⚠️ Nâng lên

5.3 Sizing Comparison

Component iOS 26 Prisma Has Token? Action
Touch target 44pt ✅ 44px OK
Button height ~44–50pt Thêm comp.height-*
Input height ~44pt Thêm comp.height-*
Tab bar 68pt Thêm layout.tab-bar-height
Nav bar 44pt Thêm layout.nav-bar-height

6. Priority Roadmap

# Task Effort Impact Priority
1 Thêm comp.radius-capsule: 9999px vào cả 2 density files Small 🔴 High — iOS 26 primary shape P0
2 Nâng comp.radius mobile 8px → 12px Small 🔴 High — closer to iOS 26 P0
3 Thêm comp.height-* tokens (44/48/36px) Small 🟡 Medium — standardize heights P1
4 Thêm concentric radius CSS helper Medium 🟡 Medium — iOS 26 nesting P1
5 Nâng comp.padding-default mobile 12→16px Small 🟡 Medium — spacious feel P1
6 Nâng form stack-gap 4→8px Small 🟡 Medium — form legibility P1
7 Thêm layout.* tokens (tab/nav bar heights) Small 🟢 Low-Med — structured P2
8 Tạo ios26.json style file Large 🟢 Future — full glass aesthetic P3

7. Kết Luận

Có áp dụng cho app được không?

✅ Có — nhưng cần bổ sung, không cần rebuild lại.

iOS 26 thay đổi chủ yếu ở 3 điểm mà Prisma cần update:

  1. Capsule shapes — Thêm 1 token radius-capsule: 9999px, dev opt-in khi muốn iOS 26 button style
  2. Concentric radius — Thêm CSS helper function, không cần thay đổi token architecture
  3. Spacious padding — Tăng nhẹ comp padding trên mobile (12→16px) — breaking nhưng nhỏ

Phần lớn layout spacing không đổi (screen margin 16pt, card padding 16pt vẫn vậy). Thay đổi lớn là ở visual (glass material, floating controls) hơn là metrics.

Rủi ro

Risk Level Mitigation
Capsule radius quá khác current design 🟡 Medium Opt-in token, không force default
Comp padding tăng → buttons lớn hơn 🟡 Medium Test visual regression trước
iOS 26 beta → specs có thể thay đổi 🟢 Low Chờ Public Release (Sep 2025) xác nhận
Glass effect CSS simulation 🔴 High (nếu muốn) backdrop-filter: blur() saturate() chỉ là gần đúng

8. Quyết Định Cần Xác Nhận

[!IMPORTANT] Cần confirm trước khi implement:

  1. Capsule shape default? — Có muốn comp.radius bằng capsule (9999px) cho iOS 26 mode, hay giữ fixed và thêm comp.radius-capsule riêng?
  2. Comp padding nâng? — Mobile comp.padding-default 12→16px: đồng ý? Sẽ ảnh hưởng tất cả button/input size
  3. Priority? — Bắt đầu với Plan A (incremental adds) hay Plan B (tạo ios26.json style riêng)?
  4. Form gap?comp.stack-gap-default 4→8px: chấp nhận breaking?
  5. Concentric radius — Thêm CSS utility class hay chỉ document convention cho dev tự calc?