Skip to content

[fix] Fix action sheet opacity for iOS Liquid Glass#504

Open
Tehnix wants to merge 1 commit into
ammarahm-ed:masterfrom
Tehnix:patch-1
Open

[fix] Fix action sheet opacity for iOS Liquid Glass#504
Tehnix wants to merge 1 commit into
ammarahm-ed:masterfrom
Tehnix:patch-1

Conversation

@Tehnix
Copy link
Copy Markdown

@Tehnix Tehnix commented Feb 1, 2026

Description

This sets a lower bound for the action sheet opacity to 0.02 on iOS, to work around Liquid Glass limitation on iOS where a too low alpha makes the Liquid Glass background disapear entirely.

I've tested with values lower than 0.02, but these also seem to break Liquid Glass (e.g. 0.01 will not work). I'm currently using these changes here locally and everything seems to be working nicely.

Note that this is a small change to the default value of the opacity on iOS, but I think it's worth not putting behind a prop (or at least making it the default) to avoid people getting a surprising behavior when trying to use Liquid Glass views, which I would assume would only start happening more - not everyone will be lucky to find out that opacity from parent views (even when not active) can break the Liquid Glass views 😅

More info

Screenshots

Without this patch, the Liquid Glass effect will disappear entirely With opacity 0.02 it now shows up
Screenshot 2026-02-01 at 13 32 29 Screenshot 2026-02-01 at 13 32 36

The above is using Glass Effect from Expo, but from the linked issue independent implementations also run into the opacity issue, e.g. https://github.com/callstack/liquid-glass (callstack/liquid-glass#27 (comment)).

This sets a lower bound for the action sheet opacity to 0.02 on iOS, to work around Liquid Glass limitation on iOS where a too low alpha makes the Liquid Glass background disapear entirely.

Relevant documentation https://developer.apple.com/documentation/uikit/uivisualeffectview#Set-the-correct-alpha-value

More context expo/expo#41024
@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 1, 2026

@Tehnix is attempting to deploy a commit to the Ammar Ahmed's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Tehnix
Copy link
Copy Markdown
Author

Tehnix commented Apr 22, 2026

@ammarahm-ed let me know if there's any changes needed to this. I've been running it in production for a while and it fixes my issues with Liquid Glass otherwise being broken.

I could amend it to be configurable?

@sbcarp
Copy link
Copy Markdown

sbcarp commented May 19, 2026

+1 to this

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.

2 participants