Skip to content

Add Liquid Glass button options#2

Merged
Apdelrahman1911 merged 1 commit into
mainfrom
feature/liquid-glass-buttons
Jul 6, 2026
Merged

Add Liquid Glass button options#2
Apdelrahman1911 merged 1 commit into
mainfrom
feature/liquid-glass-buttons

Conversation

@Apdelrahman1911

Copy link
Copy Markdown
Owner

What

iOS 26 Liquid Glass for the button family as an iOS-only appearance knob layered on the existing variants:

NativeButton(
    text = "Continue",
    onClick = { … },
    variant = NativeButtonVariant.Primary,
    ios = NativeButtonIosOptions(background = NativeButtonIosBackground.ProminentGlass),
)
  • Glass — clear adaptive capsule (real UIGlassEffect, runtime-instantiated since the class postdates the K/N bindings); content uses the system label color.
  • ProminentGlass — glass tinted with the variant's container color.
  • Automatic (default) — today's flat rendering, byte-identical.

Behavior contract

  • iOS 26+: real glass, overlay-composited above the canvas so the effect refracts the Compose content beneath; interactive press morph from the system (the kit press dimmer steps aside).
  • iOS < 26: silent fallback to Automatic (class-lookup gated, no @available).
  • Android: documented no-op — the variant renders through Material as always (Robolectric-guarded).
  • NativeSplitButton accepts the option but renders Automatic this release (a two-segment control needs one shared glass body — documented in buttons.md).

Demos & docs

  • Sample app: Settings → Developer → "Liquid glass buttons" (capsules refracting auto-scrolling stripes; device-verified on an iPhone 17) and a showcase section under Buttons.
  • docs/components/buttons.md (fallback matrix, HIG guidance), docs/interop-notes.md, docs/design-system-rules.md.

Gates

apiCheck/apiDump (additive API), kit + app unit tests incl. the new Android no-op guard, iOS compile, assembleDebug, xcodebuild.

@Apdelrahman1911
Apdelrahman1911 merged commit 4e54637 into main Jul 6, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant