Glassmorphism with this modal?

See original GitHub issue

Feature Request

Hi guys! Thank you for this very very very good lib.) It really helpfull!

The issue is I trying to add glassmorphism to your modal… Make it blur and transparent using expo-blur… But the issue is when I trying to do it by docs https://gorhom.github.io/react-native-bottom-sheet/custom-background it won’t work properly.

I trying to acieve something like that image

Why it is needed

Because glassmorphism is very simple and popular design pattern this days)

Issue

Yes probably backgroundComponent has some issues with displaying specific background like BlurView and so on… At first render view blured and then it’s not. Probably it somehow depend on component animation or rendering system?!

Possible implementation

Make some complex samples of customizing background? Or improve backgroundComponent prop to create specific backgrounds?

Code sample

Sample of custom background

import React from 'react';
import ComponentsStyles from "../../constants/ComponentsStyles";
import {BlurView} from "expo-blur";

export default function PanelBackground({style}) {
    return (
        <BlurView
            style={{
                ...style,
                overflow: 'hidden',
                ...ComponentsStyles.borderRadius.topRadius,
                // backgroundColor: `rgba(255,255,255,0)`
                // backgroundColor: theme.rgbaWhiteComponents,
            }}
            intensity={30}
        />
    )
}

Sample of how I use it


           <BottomSheet
                animateOnMount={false}
                style={{
                    marginHorizontal: 5,
                    ...shadowGenerator(1),
                    ...ComponentsStyles.borderRadius.topRadius
                }}
                backgroundComponent={PanelBackground}
                enableOverDrag={false}

Issue Analytics

  • State:open
  • Created 10 months ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
anshcommented, Dec 12, 2022

It is possible to do. Just set the Bottom Sheet’s style={{backgroundColor: "transparent"}} then put a BlurView inside with flex: 1

I just tried it and it works perfectly. @GeorgeHop

1reaction
anshcommented, Dec 5, 2022

This would be cool. What isn’t working?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to design a glassmorphic sign up modal in FigmaPart 2
In this video I design a glassmorphic sign up modal form in Figma. This video is the second part of the video where...
Read more >
39 CSS Glassmorphism Effects
Collection of free HTML and CSS glassmorphism effect code examples from ... CSS Glassmorphism Button Hover Effects ... Demo image: Feedback Modal Design ......
Read more >
Glassmorphism CSS Generator
Glassmorphism is a design style, coined by Michal Malewicz from Hype4.Academy to connect and combine all of the uses of the “frosted glass”...
Read more >
Pure CSS Glassmorphism Modal
<h1>Glassmorphism</h1>. 7. <p>Explicabo necessitatibus nesciunt facilis ab temporibus dolor placeat quo impedit. Numquam, reiciendis non.</p>.
Read more >
Glassmorphism feedback modal using HTML, CSS and JavaScript
Hello Guys! Welcome to Coding Torque. In this blog, we are going to make a Glassmorphism feedback modal using HTML, CSS and JavaScript....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found