Loading video...

Video Failed to Load

Go Home

🤌 Glassmorphism with Tailwind CSS 1️⃣ set a semi-transparent background 2️⃣ use `backdrop-filter: blur` 3️⃣ play with the bg opacity, blur level, border and shadow ✨

12,802 views • 1 year ago •via X (Twitter)

9 Comments

Falgantil's profile picture
Falgantil1 year ago

Really love these simple clips that shows how to use CSS properties you might not get to use on a daily basis.

Simon Vrachliotis's profile picture
Simon Vrachliotis1 year ago

That's great to hear 🤙

𝗻𝗲𝘅𝘅𝗮𝗶's profile picture
𝗻𝗲𝘅𝘅𝗮𝗶1 year ago

So good!

Simon Vrachliotis's profile picture
Simon Vrachliotis1 year ago

✌️

Web Reaper | Website Engineer's profile picture
Web Reaper | Website Engineer1 year ago

Definitely a popular effect. Only risk is stuttering if there's a lot of it or the blur is high

Simon Vrachliotis's profile picture
Simon Vrachliotis1 year ago

True, use with moderation ✌️

Jon Meyers's profile picture
Jon Meyers1 year ago

This is sick! More videos like this please!

Simon Vrachliotis's profile picture
Simon Vrachliotis1 year ago

🫡

Leandro Acosta 🇧🇷🇨🇳's profile picture
Leandro Acosta 🇧🇷🇨🇳1 year ago

Whole ERP using this glassmorphism

Related Videos

CSS Trick! 🤙 You can create gradient borders on translucent elements using mask-clip and mask-composite with a pseudo-element 🔥 .gradient-border::after { mask-clip: padding-box, border-box; mask-composite: intersect; mask: linear-gradient(transparent, transparent), linear-gradient(white, white); } It's the same "Transparent border trick" from before. But, now you apply it to a pseudo-element 😎 The trick is to create a pseudo-element with a gradient background and then mask it so we only see the part we want, the border ✨ mask-clip defines the area affected by a mask. Similar to how you can define background-size. Using padding-box and border-box constrains the two masks. mask-composite is the magic part ✨ It defines a compositing operation for stacked mask layers. Using intersect means that the parts that overlap get replaced. And this seems to work in all browsers 🙌 As for the rest of the styles... – Make sure you set pointer-events: none on the pseudo-element – Make sure it fills the parent element. You can use position: absolute and inset: 0 – Make sure the background fills the space including the border-width. You can use calc to achieve that: --bg-size: calc(100% + (2px * var(--border))); background: var(--gradient) center center / var(--bg-size) var(--bg-size); That's it! 🚀 Gradient borders on translucent elements. You can set all the backdrop-filter: blur() you like! 😅 CodePen.IO link below! 👇

jhey ʕ•ᴥ•ʔ

269,739 views • 2 years ago