Glassmorphism
elegant Visual effectFrosted glass meets modern elegance
Reference year: 2024
Compare this themeBest for
SaaS, Portfolio, Brand & events
Less suitable for
- Text-heavy pages with complex images directly behind transparent panels.
Live component preview
Try the sample controls. daisyUI uses compiled library classes; shadcn/ui uses React components from the New York registry. The three example layouts demonstrate styling with the selected tokens. All content is demo data.
Examples
Color Palette
Typography
Key Characteristics
- Frosted glass effect with backdrop-blur
- Semi-transparent backgrounds using rgba values
- Subtle borders with low opacity white
- Layered depth with overlapping glass panels
- Gradient backgrounds behind glass elements
- Soft shadows for depth
Tags
Glassmorphism emerged as a dominant UI trend in the early 2020s, drawing inspiration from Apple’s macOS Big Sur and Microsoft’s Fluent Design System. The style creates an illusion of frosted glass floating above colorful backgrounds, producing interfaces that feel simultaneously modern and ethereal. Its hallmark is the use of CSS backdrop-filter: blur() combined with semi-transparent backgrounds and subtle border highlights.
When to Use
Glassmorphism excels in dashboards, music players, portfolio sites, and any application where you want to create a sense of depth and premium feel without heavy visual weight. It works particularly well over gradient or image-rich backgrounds where the blur effect can truly shine. Avoid using it for text-heavy interfaces or contexts where maximum readability is critical, as the transparency can reduce contrast.
Key Visual Elements
The core visual ingredients are semi-transparent panels (typically rgba(255, 255, 255, 0.1) to 0.25), a backdrop blur of 10-20px, and a thin 1px border in rgba(255, 255, 255, 0.2) to catch light on the panel edges. Layering multiple glass panels at different depths creates a compelling parallax-like effect. Background gradients using the primary and secondary colors provide the colorful canvas that makes the frosted effect visible.
Typography
Pair geometric sans-serif headings like Poppins with the clean neutrality of Inter for body text. Keep font weights on the lighter side (300-500) to complement the airy feel of the glass panels. White or near-white text on dark translucent backgrounds ensures readability while maintaining the ethereal aesthetic.
Export style
Choose a library mapping or use the CSS variables in your own components. JSON includes the same mapping. Load the listed fonts separately.
:root {
--tx-surface-bg: #0F172A;
--tx-font-heading: "Poppins", sans-serif;
--tx-font-body: "Inter", sans-serif;
--tx-surface-bg-image: radial-gradient(ellipse 80% 50% at 20% 40%, rgba(124,58,237,0.15), transparent), radial-gradient(ellipse 60% 50% at 80% 20%, rgba(236,72,153,0.12), transparent), radial-gradient(ellipse 50% 40% at 50% 80%, rgba(6,182,212,0.10), transparent);
--tx-card-bg: rgba(255,255,255,0.05);
--tx-card-border: rgba(255,255,255,0.1);
--tx-card-border-width: 1px;
--tx-card-radius: 1rem;
--tx-card-shadow: none;
--tx-card-backdrop-blur: 16px;
--tx-card-border-hover: rgba(255,255,255,0.2);
--tx-card-shadow-hover: none;
--tx-font-heading-weight: 700;
--tx-font-body-weight: 400;
--tx-text-muted: rgba(248,250,252,0.7);
--tx-text-subtle: rgba(248,250,252,0.5);
--tx-link-color: #7C3AED;
--tx-button-radius: 9999px;
--tx-input-bg: rgba(255,255,255,0.05);
--tx-input-border: rgba(255,255,255,0.1);
--tx-text: #F8FAFC;
--tx-primary: #7C3AED;
--tx-secondary: #EC4899;
--tx-accent: #06B6D4;
--tx-media-filter: none;
}
Prompt Builder
Choose your project, UI library, and output. Prompts, documents, and exports use the same resolved theme values.
Use your own components with the exported CSS variables.
Glassmorphism
Live component preview
Try the sample controls. daisyUI uses compiled library classes; shadcn/ui uses React components from the New York registry. The three example layouts demonstrate styling with the selected tokens. All content is demo data.
Copy this prompt into your coding assistant. The task mode applies to the UI prompt.
Generated prompt
You are building a web application using Next.js with Tailwind.
Read existing project instructions and reuse installed components where available.
## Project
Project brief: Not specified
Target users: Not specified
Page purpose: SaaS
Framework: Next.js
CSS approach: Tailwind
UI library: Custom / no library
Tone: Professional
## Visual direction
Base theme: Glassmorphism (visual-effect)
- Frosted glass effect with backdrop-blur
- Semi-transparent backgrounds using rgba values
- Subtle borders with low opacity white
- Layered depth with overlapping glass panels
- Gradient backgrounds behind glass elements
- Soft shadows for depth
## Resolved style
Use this final token set. It already includes the selected layers. These values take precedence over conflicting base characteristics.
Color palette: primary #7C3AED, secondary #EC4899, accent #06B6D4, background #0F172A, text #F8FAFC
Typography: Poppins for headings, Inter for body text
Load the declared fonts with the required weights. Use system fallbacks when a font is unavailable.
```css
:root {
--tx-surface-bg: #0F172A;
--tx-font-heading: "Poppins", sans-serif;
--tx-font-body: "Inter", sans-serif;
--tx-surface-bg-image: radial-gradient(ellipse 80% 50% at 20% 40%, rgba(124,58,237,0.15), transparent), radial-gradient(ellipse 60% 50% at 80% 20%, rgba(236,72,153,0.12), transparent), radial-gradient(ellipse 50% 40% at 50% 80%, rgba(6,182,212,0.10), transparent);
--tx-card-bg: rgba(255,255,255,0.05);
--tx-card-border: rgba(255,255,255,0.1);
--tx-card-border-width: 1px;
--tx-card-radius: 1rem;
--tx-card-shadow: none;
--tx-card-backdrop-blur: 16px;
--tx-card-border-hover: rgba(255,255,255,0.2);
--tx-card-shadow-hover: none;
--tx-font-heading-weight: 700;
--tx-font-body-weight: 400;
--tx-text-muted: rgba(248,250,252,0.7);
--tx-text-subtle: rgba(248,250,252,0.5);
--tx-link-color: #7C3AED;
--tx-button-radius: 9999px;
--tx-input-bg: rgba(255,255,255,0.05);
--tx-input-border: rgba(255,255,255,0.1);
--tx-text: #F8FAFC;
--tx-primary: #7C3AED;
--tx-secondary: #EC4899;
--tx-accent: #06B6D4;
--tx-media-filter: none;
}
```
Use the CSS variables in your own components. Apply the heading and body font variables to their respective elements.
## Layout
- Place translucent panels over a gradient while keeping text areas readable.
## Interaction
- Use subtle border and shadow changes. Provide an opaque surface when blur is unsupported.
## Suitability notes
Use these limitations to assess the chosen page purpose. Explain any mismatch before applying an unsuitable treatment.
- Glassmorphism: Text-heavy pages with complex images directly behind transparent panels.
## Components
Generate the following components in this style:
- Hero
- Navbar
- Cards
- Footer
## Quality requirements
Choose section order and visual emphasis from the real content and page purpose. Add only sections needed for the task.
Use supplied content. Label sample data. Do not invent testimonials, customer logos, statistics, or compliance claims.
Every interactive control must perform its declared action or be clearly labeled as a demo.
Include loading, empty, error, success, disabled, and focus states where applicable.
Use semantic HTML, visible keyboard focus, readable text contrast, and labeled form fields.
Ensure responsive design (mobile-first). Preserve reading order and avoid horizontal page overflow.
Respect prefers-reduced-motion. Keep essential content visible when animations are disabled.
## Verification
Check representative desktop and mobile widths, keyboard interaction, and relevant component states. Run available project checks and report what was actually verified.
Use Tailwind utility classes with the declared tokens.
Product context is incomplete. Label assumptions and treat the result as a draft until the missing context is supplied.