Skip to content
glassmorphism logo

Glassmorphism Pattern

glassmorphism

Creates frosted glass UI elements with blur, transparency, and subtle borders. Use when building overlays, floating controls, tooltips, or any element that should appear elevated with a translucent background.

SKILL.md

Full skill instructions

Glassmorphism Pattern

Create frosted glass effects for overlays and floating UI elements.

Core Classes

// Standard glassmorphic container
<div className="bg-black/​20 backdrop-blur-md border border-white/​10">
  ...
</​div>

Variations

Dark Overlay (on images/​media)

Best for controls overlaid on images or video.

<div className="bg-black/​20 backdrop-blur-md border border-white/​10 rounded-full px-3 py-2">
  {/​* Content */​}
</​div>

Light Overlay (on dark backgrounds)

<div className="bg-white/​10 backdrop-blur-md border border-white/​20 rounded-xl px-4 py-3">
  {/​* Content */​}
</​div>

Subtle Glass (minimal effect)

<div className="bg-black/​10 backdrop-blur-sm border border-white/​5 rounded-lg px-3 py-2">
  {/​* Content */​}
</​div>

Strong Glass (prominent effect)

<div className="bg-black/​40 backdrop-blur-lg border border-white/​20 rounded-2xl px-5 py-4">
  {/​* Content */​}
</​div>

Token Reference

PropertyLight GlassStandardStrong
Backgroundbg-black/​10bg-black/​20bg-black/​40
Blurbackdrop-blur-smbackdrop-blur-mdbackdrop-blur-lg
Borderborder-white/​5border-white/​10border-white/​20

Common Use Cases

Carousel Indicators

<div className="absolute bottom-3 left-1/​2 -translate-x-1/​2">
  <div className="flex items-center gap-2 px-3 py-2 rounded-full bg-black/​20 backdrop-blur-md border border-white/​10">
    {/​* Indicator dots */​}
  </​div>
</​div>

Floating Action Button

<button className="fixed bottom-6 right-6 p-4 rounded-full bg-black/​20 backdrop-blur-md border border-white/​10 hover:bg-black/​30 transition-colors">
  <Icon className="w-6 h-6 text-white" />
</​button>

Tooltip/​Popover

<div className="absolute top-full mt-2 px-3 py-2 rounded-lg bg-black/​30 backdrop-blur-md border border-white/​10">
  <span className="text-white text-sm">Tooltip content</​span>
</​div>

Navigation Bar (over hero)

<nav className="fixed top-0 left-0 right-0 z-50 bg-black/​10 backdrop-blur-md border-b border-white/​10">
  {/​* Nav content */​}
</​nav>

Text Contrast

When using glassmorphism, ensure text has sufficient contrast:

Background OpacityText Color
bg-black/​10 - bg-black/​20text-white or text-white/​90
bg-black/​30 - bg-black/​40text-white
bg-white/​10 - bg-white/​20text-white or text-zinc-100

Performance Note

backdrop-blur can impact performance on lower-end devices. Consider:

  • Using smaller blur values (backdrop-blur-sm) for frequently updated elements
  • Avoiding large glassmorphic areas that cover significant viewport
  • Testing on mobile devices

Checklist

  • Background has transparency (e.g., bg-black/​20)
  • backdrop-blur-* applied for frosted effect
  • Subtle border with transparency (border-white/​10)
  • Text has sufficient contrast
  • Border radius matches design language
  • Tested on lower-end devices for performance

More Other skills

Delegate independent tasks to specialized agents working concurrently with isolated context.

295.4K 206.3K
View

Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.

179.7K 100.1K
View

Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.

179.7K 89.5K
View

A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).

179.7K 76.1K
View

Fundamental design principles for writing maintainable, testable Python code.

40.2K 21.9K
View

Modern responsive layouts using container queries, fluid typography, CSS Grid, and mobile-first strategies.

40.2K 20K
View

Generate Playwright tests from scenarios using interactive browser exploration and validation.

39.7K 18.2K
View

Modern React state management with Redux Toolkit, Zustand, Jotai, and React Query for every state category.

40.2K 14.7K
View

GDPR-compliant data handling with consent management, data subject rights, and privacy controls.

40.2K 14.3K
View

Python error handling patterns including input validation, exception hierarchies, and partial failure handling. Use when implementing validation logic, designing exception strategies, handling batch processing failures, or building robust APIs.

40.2K 13.5K
View

Detailed multi-file refactor planning with safety checks and rollback guidance.

39.7K 13K
View