Skip to content

feat(ios): expose UIGlassEffect clear variant via new backgroundGlass prop#665

Open
michelemarri wants to merge 1 commit intolodev09:mainfrom
michelemarri:feat/background-glass-prop
Open

feat(ios): expose UIGlassEffect clear variant via new backgroundGlass prop#665
michelemarri wants to merge 1 commit intolodev09:mainfrom
michelemarri:feat/background-glass-prop

Conversation

@michelemarri
Copy link
Copy Markdown

Closes #663

Adds a new backgroundGlass?: 'regular' | 'clear' prop on <TrueSheet> so apps can opt into iOS 26's UIGlassEffectStyleClear variant. Naming mirrors the existing backgroundColor / backgroundBlur props per your suggestion in the issue thread.

API

<TrueSheet detents={[0.5, 0.9]} backgroundGlass="clear">
  {/* ... */}
</TrueSheet>
  • 'regular' (default): existing behavior — system-default Liquid Glass (.regular style, with luminosity veil for content legibility)
  • 'clear': new option → UIGlassEffect(style: .clear, isInteractive: true). High transparency, minimal adaptivity, designed for media-rich backdrops where the app provides its own dimming/blur layer

Precedence

Follows the existing pattern — backgroundColor wins over backgroundBlur, which wins over backgroundGlass. The new prop only kicks in when neither of the other two is set, on iOS 26.1+, and UIDesignRequiresCompatibility is not opted-in.

Scope

  • src/fabric/TrueSheetViewNativeComponent.ts — Fabric spec
  • src/TrueSheet.types.ts — public TS types (new BackgroundGlass type + prop)
  • src/TrueSheet.tsx — destructure + forward to native
  • src/navigation/types.ts — add to TrueSheetNavigationSheetProps Pick list
  • ios/TrueSheetViewController.h — new @property
  • ios/TrueSheetView.mm — wire newProps.backgroundGlass → _controller.backgroundGlass
  • ios/TrueSheetViewController.mm — use it in setupBackground

~40 lines added, zero deletions. Fully additive: no behavior change for existing users, default 'regular' preserves current Liquid Glass appearance.

Testing

Deployed in production via patch-package in soglia72 (an Italian fantasy-football app for Serie A). The backgroundGlass="clear" variant is used on a sheet presented over a custom animated pitch canvas, where the system's regular glass veil was washing out the background. No regressions on existing sheets that don't set the prop.

Happy to add docs / changelog entry / example snippet if you'd like — let me know how you prefer to structure additions. Thanks for the library and the quick turnaround on the issue!

… prop

Adds backgroundGlass?: 'regular' | 'clear' prop to <TrueSheet> so apps
can opt into the iOS 26 UIGlassEffectStyleClear variant instead of the
default regular glass.

The prop is ignored when `backgroundColor` or `backgroundBlur` is set
(same precedence as today), and on pre-iOS 26 runtimes. Default
'regular' preserves existing behavior for all current users.

Naming mirrors the existing backgroundColor / backgroundBlur props for
consistency (per maintainer feedback on lodev09#663).

Closes lodev09#663
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 24, 2026

@michelemarri is attempting to deploy a commit to the Dinky Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Copy Markdown
Owner

@lodev09 lodev09 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @michelemarri, thanks for the PR! Looks good to me.
Have you tried building on android? I think this will break, we need a stub for this on android, I think.

Also if you don't mind updating the CHANGELOG. Thank you!

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.

feat(ios): expose UIGlassEffect clear variant via new glassStyle prop

2 participants