Skip to content

Glassmorphism Card

Frosted glass profile card in Tailwind CSS with backdrop blur, a light reflection and a follow button over colorful animated gradient blobs.

Also known as: frosted glass card, glassmorphism profile card, blurred glass effect, translucent card

Tailwind CSS Cards Responsive Dark #card #glassmorphism #gradient #profile #responsive

Glassmorphism Card live demo

Open in new tab

Tailwind CSS code (HTML, CSS, JS)

A glassmorphism profile card built with Tailwind CSS: a frosted, semi-transparent panel floating over a colorful background of blurred gradient blobs. It works well for profile previews, team pages, landing page highlights or any spot where you want a modern, layered look.

How it works

The root is section.tgc-scene, a dark bg-indigo-950 stage with isolate and overflow-hidden. Behind the content sits an aria-hidden layer with three .tgc-blob circles (fuchsia, cyan and amber) softened with blur-3xl, plus two small sharp gradient shapes that make the blur effect behind the glass easy to see.

The card itself is article.tgc-card. The frosted effect comes from Tailwind utilities: bg-white/10 for the translucent fill, backdrop-blur-2xl and backdrop-saturate-150 to blur and boost the colors behind it, and border-white/25 for the bright glass edge. In style.css, a .tgc-card::before gradient adds a diagonal light reflection, and an @supports not rule switches to a more opaque indigo fill when the browser has no backdrop-filter support, so the text stays readable. The blobs drift slowly with the tgc-float keyframes.

Inside the card are an initials avatar, name, location, an "Available" pill, a short bio, a three-column stats list (dl) and two actions. The script runs on DOMContentLoaded for each .tgc-card: clicking [data-tgc-follow] toggles aria-pressed, swaps the label between "Follow" and "Following", switches the plus and check icons with the hidden class, and adds one to the follower number stored in data-tgc-count.

Customization

  • bg-white/10 and backdrop-blur-2xl on .tgc-card: raise the opacity (bg-white/20) or lower the blur (backdrop-blur-md) for a clearer or frostier glass.
  • The color classes on .tgc-blob--a, .tgc-blob--b and .tgc-blob--c (bg-fuchsia-500, bg-cyan-400, bg-amber-300): change them to match your brand palette.
  • bg-indigo-950 on .tgc-scene: set the base color the blobs glow on; a lighter base gives a pastel look.
  • animation-duration on .tgc-blob in style.css: make the drift faster or slower, or remove the animation for a static background.
  • data-tgc-count on the Followers value: set the starting number used by the Follow button.
  • rounded-3xl on the card: use rounded-2xl for tighter corners.

Use cases

  • Profile previews: a frosted card shows avatar, bio, stats and a follow button over colorful blurred shapes
  • Team pages: a modern layered card introduces each member with an availability pill
  • Landing page highlights: animated gradient blobs behind the glass make a feature block stand out
  • Creator showcases: the follow button toggles its state and adds one to the follower count

Accessibility

The card is an article labelled by #tgc-name, and the decorative background and avatar are aria-hidden. The Follow control is a button with aria-pressed and a fixed aria-label, so screen readers hear "Follow Jordan Ellis, toggle button, pressed" instead of a changing name; a role="status" region confirms each change. White text sits on a dark, blurred backdrop for strong contrast, and buttons show a white focus-visible outline. Blob motion stops under prefers-reduced-motion, and button transitions use motion-reduce:transition-none.

Usage notes

backdrop-filter needs a colorful or detailed background behind the card to be visible; over a flat color it looks like a plain translucent box. Multiple cards can share a page because the script scopes its queries to each .tgc-card; give each name heading a unique id.

Glassmorphism Card at a glance

Framework
Tailwind CSS
Code
HTML, CSS, JavaScript
JavaScript
Vanilla JavaScript, no jQuery
Dependencies
Tailwind CSS
Layout
Responsive, works on mobile, dark design
Category
Cards
License
Free for personal and commercial use

Questions about this template

Can I use the Glassmorphism Card code for free?

Yes. You can copy or download the code and use it in personal and commercial projects, including client work. No sign-up is needed. Reselling it as part of a component library or template collection is not allowed; see the license.

How do I add it to my website?

Load Tailwind CSS from a CDN (the links are under Requirements). Paste the HTML where the component should appear, add the CSS to your stylesheet and load the JavaScript before the closing </body> tag. Download HTML gives you a complete page with everything already linked.

Does it need jQuery or a JavaScript framework?

No. The script is plain vanilla JavaScript, so it works without jQuery, React or Vue. You can still use the markup inside those frameworks.

Does it work on mobile?

Yes. The layout adapts to small screens. Use the Mobile and Tablet buttons above the live demo to check it at phone and tablet width.

Requirements

Add these to your page (already included in the download):

  • <script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>

The Tailwind browser build is for prototyping. In production, compile Tailwind with its CLI or your bundler.

Glassmorphism Card – Tailwind CSS cards component screenshot
Glassmorphism Card · Tailwind CSS Cards

More Cards

Blog Post Card – Tailwind CSS cards preview

Blog Post Card

Tailwind CSS blog post card with cover illustration, category badge, date, reading time, clamped excerpt, author row and a fully clickable area.

Event Card with Photo and Date Badge – Pure CSS cards preview

Event Card with Photo and Date Badge

Pure CSS event cards with a cover photo, ticket-stub date badge, category chip, time and venue details, price and a ticket button.

Cards with Hover Lift – Pure CSS cards preview

Cards with Hover Lift

Pure CSS blog card grid where each card lifts with a deeper shadow and zooms its image on hover or keyboard focus.

Card with Image Overlay – Bootstrap 5 cards preview

Card with Image Overlay

Bootstrap 5 image cards with text overlaid on photos, a readability gradient, category badges, save buttons and a featured layout.

3D Flip Card – Pure CSS cards preview

3D Flip Card

Three pure CSS 3D flip cards that turn on hover, keyboard focus or tap to reveal details and a link on the back.