Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ios/TrueSheetView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,9 @@ - (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const &
// Blur tint
_controller.backgroundBlur = newProps.backgroundBlur;

// Liquid Glass style (iOS 26+)
_controller.backgroundGlass = newProps.backgroundGlass;

// Blur options
const auto &blurOpts = newProps.blurOptions;
_controller.blurIntensity = blurOpts.intensity >= 0 ? @(blurOpts.intensity) : nil;
Expand Down
1 change: 1 addition & 0 deletions ios/TrueSheetViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, assign) BOOL dimmed;
@property (nonatomic, strong, nullable) NSNumber *dimmedDetentIndex;
@property (nonatomic, assign) facebook::react::TrueSheetViewBackgroundBlur backgroundBlur;
@property (nonatomic, assign) facebook::react::TrueSheetViewBackgroundGlass backgroundGlass;
@property (nonatomic, strong, nullable) NSNumber *blurIntensity;
@property (nonatomic, assign) BOOL blurInteraction;
@property (nonatomic, assign) BOOL pageSizing;
Expand Down
9 changes: 9 additions & 0 deletions ios/TrueSheetViewController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,16 @@ - (void)setupBackground {
self.sheet.backgroundEffect = [UIColorEffect effectWithColor:self.backgroundColor];
} else if (hasBlur) {
self.sheet.backgroundEffect = [UIColorEffect effectWithColor:[UIColor clearColor]];
} else if (self.backgroundGlass == facebook::react::TrueSheetViewBackgroundGlass::Clear) {
// Clear glass variant (iOS 26+). Higher transparency, no luminosity
// veil. Designed for media-rich backgrounds; typically paired with
// an explicit dimming/blur layer for content legibility.
UIGlassEffect *glass = [UIGlassEffect effectWithStyle:UIGlassEffectStyleClear];
glass.interactive = YES;
self.sheet.backgroundEffect = glass;
} else {
// Default: let the system apply iOS 26's standard Liquid Glass
// (UIGlassEffectStyleRegular under the hood).
self.sheet.backgroundEffect = nil;
}
return;
Expand Down
2 changes: 2 additions & 0 deletions src/TrueSheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,7 @@ export class TrueSheet extends PureComponent<TrueSheetProps, TrueSheetState> {
initialDetentAnimated = true,
dimmedDetentIndex,
backgroundBlur,
backgroundGlass,
blurOptions,
cornerRadius,
maxContentHeight,
Expand Down Expand Up @@ -487,6 +488,7 @@ export class TrueSheet extends PureComponent<TrueSheetProps, TrueSheetState> {
style={styles.sheetView}
detents={resolvedDetents}
backgroundBlur={backgroundBlur}
backgroundGlass={backgroundGlass}
blurOptions={blurOptions}
backgroundColor={backgroundColor}
cornerRadius={cornerRadius}
Expand Down
19 changes: 19 additions & 0 deletions src/TrueSheet.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,16 @@ export type InsetAdjustment =
*/
| 'never';

/**
* iOS 26+ Liquid Glass style.
*
* - 'regular': Standard glass with luminosity veil for readability (default).
* - 'clear': High-transparency glass for media-rich backgrounds.
*
* @platform ios 26+
*/
export type BackgroundGlass = 'regular' | 'clear';

/**
* Blur style mapped to native values in IOS.
*
Expand Down Expand Up @@ -371,6 +381,15 @@ export interface TrueSheetProps extends ViewProps {
*/
backgroundBlur?: BackgroundBlur;

/**
* iOS 26+ Liquid Glass style. Ignored when `backgroundColor` or
* `backgroundBlur` is set, or on pre-iOS 26 runtimes.
*
* @platform ios 26+
* @default 'regular'
*/
backgroundGlass?: BackgroundGlass;

/**
* Options for customizing the blur effect.
* Only applies when `backgroundBlur` is set.
Expand Down
4 changes: 4 additions & 0 deletions src/fabric/TrueSheetViewNativeComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ export interface NativeProps extends ViewProps {
'none'
>;

// iOS 26+ Liquid Glass style. Ignored when backgroundColor or
// backgroundBlur is set, or on pre-iOS 26 runtimes.
backgroundGlass?: WithDefault<'regular' | 'clear', 'regular'>;

anchor?: WithDefault<'left' | 'center' | 'right', 'center'>;
anchorOffset?: WithDefault<Double, 16>;
insetAdjustment?: WithDefault<'automatic' | 'never', 'automatic'>;
Expand Down
1 change: 1 addition & 0 deletions src/navigation/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ export type TrueSheetNavigationSheetProps = Pick<
| 'dimmed'
| 'dimmedDetentIndex'
| 'backgroundBlur'
| 'backgroundGlass'
| 'blurOptions'
| 'maxContentHeight'
| 'maxContentWidth'
Expand Down
Loading