EmpireUI
Get Pro
← Blog7 min read#glassmorphism#chip-component#badge-ui

Glassmorphism Chips & Badges: Tag Components with Blur

Build glassmorphism chip and badge components with backdrop-filter blur, rgba fills, and Tailwind v4. Real code, zero fluff — tag UI that actually looks good.

Frosted glass chip and badge UI components floating against a purple gradient background

Why Glassmorphism Works So Well for Chips and Badges

Honestly, most chip and badge components are boring. A flat colored pill with text. Maybe a border. That's it. Glassmorphism changes the calculus here because these small components are exactly the right size to benefit from blur — large enough to show the frosted effect, small enough that you don't have to worry about performance tanks on low-end devices.

Chips and badges live inline with other content. They float over images, hero backgrounds, dark dashboard panels. A solid-color badge blocks whatever's behind it. A glass badge with backdrop-filter: blur(8px) and rgba(255,255,255,0.15) fill lets the context breathe through — the tag feels part of the UI instead of pasted on top.

If you haven't read the full breakdown of what glassmorphism actually is, that's worth a quick scan first. The short version: frosted glass aesthetics via CSS backdrop-filter, semi-transparent fills, and subtle borders. The chip/badge case is one of the cleanest applications of the style.

The Core CSS Behind a Glass Chip

The effect comes down to four properties working together. You need backdrop-filter: blur() for the frosting. A semi-transparent background — rgba(255,255,255,0.12) to rgba(255,255,255,0.20) depending on how dark your background is. A 1px border at around 20–30% opacity white. And border-radius high enough to get that pill shape, usually 9999px for full rounding.

Here's a minimal chip in plain CSS before we move to Tailwind:

.glass-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  white-space: nowrap;
  transition: background 0.2s ease;
}

.glass-chip:hover {
  background: rgba(255, 255, 255, 0.22);
}

Note the -webkit-backdrop-filter — Safari still needs it as of mid-2026. Skip it and your chips look like flat translucent rectangles on iOS. Also worth knowing: backdrop-filter only works when the element has a non-opaque background. If you set background: transparent, the blur vanishes. That catches a lot of people.

Building the React Component with Tailwind v4

Tailwind v4.0.2 ships backdrop-blur-* utilities that map directly to backdrop-filter: blur(). You can compose the whole chip without writing a single line of custom CSS. The bg-white/15 shorthand for rgba(255,255,255,0.15) is clean, and border-white/20 handles the translucent border.

import { type ReactNode } from 'react';

type ChipVariant = 'default' | 'success' | 'warning' | 'danger';

interface GlassChipProps {
  children: ReactNode;
  variant?: ChipVariant;
  onRemove?: () => void;
  icon?: ReactNode;
}

const variantStyles: Record<ChipVariant, string> = {
  default: 'bg-white/14 border-white/20 text-white',
  success: 'bg-emerald-400/20 border-emerald-400/30 text-emerald-100',
  warning: 'bg-amber-400/20 border-amber-400/30 text-amber-100',
  danger: 'bg-rose-400/20 border-rose-400/30 text-rose-100',
};

export function GlassChip({
  children,
  variant = 'default',
  onRemove,
  icon,
}: GlassChipProps) {
  return (
    <span
      className={`
        inline-flex items-center gap-1.5
        px-3 py-1
        rounded-full
        text-xs font-medium
        backdrop-blur-md
        border
        select-none
        transition-all duration-200
        hover:brightness-110
        ${variantStyles[variant]}
      `}
    >
      {icon && <span className="w-3.5 h-3.5">{icon}</span>}
      {children}
      {onRemove && (
        <button
          onClick={onRemove}
          className="ml-0.5 w-3.5 h-3.5 rounded-full opacity-70 hover:opacity-100 flex items-center justify-center"
          aria-label="Remove"
        >
          ×
        </button>
      )}
    </span>
  );
}

The backdrop-blur-md in Tailwind maps to blur(12px). If that feels too heavy — say your chips appear over a subtle gradient rather than a vivid photo — drop to backdrop-blur-sm which gives blur(4px). There's no single right value, you tune it per project.

Glass Badge vs Glass Chip: When to Use Which

Chips and badges get conflated constantly. In practice: chips are interactive, badges are display-only. A chip might have an X to dismiss it, or it's part of a multi-select input. A badge is a label slapped on a card — "New", "Sale", "Beta". Same glass aesthetic, different behavior contract.

For badges you can strip the onRemove logic and tighten the padding. A notification count badge sitting on an avatar is even smaller — maybe h-5 min-w-5 with text-[10px]. The glassmorphism effect still works at that size but you'll want to increase the blur a touch to compensate for the smaller surface area. Try blur(14px) with rgba(255,255,255,0.18) fill.

One thing to watch: if you're comparing this to other morphism styles, the glassmorphism vs neumorphism breakdown makes it clear that glass uses light that comes *through*, neumorphism uses light that comes *from*. For badges on dashboards, glass almost always wins — neumorphic badges are nearly invisible on dark backgrounds.

Handling Dark Mode and Theme Switching

Here's the thing: glass components on a light background look terrible unless you flip to a darker fill. rgba(255,255,255,0.14) over a white page gives you almost nothing. You need something like rgba(0,0,0,0.08) with border: 1px solid rgba(0,0,0,0.12) for light mode, then swap to the white fills for dark.

Tailwind dark mode makes this manageable. You'd write bg-black/8 dark:bg-white/14 border-black/12 dark:border-white/20. That covers the majority of cases without JS involvement. If you're building a more elaborate theme switcher, the theme toggle in React guide covers the persistence and flash-of-incorrect-theme issues.

What you shouldn't do is reach for opacity on the whole component to achieve translucency — that affects the text too and makes your chips illegible over busy backgrounds. Always target the background and border colors specifically with alpha channel values.

Tag Cloud and Filter Chip Patterns

Filter chips — the toggleable kind used in search interfaces — need an "active" state. The natural glass approach is to increase the fill opacity and maybe add a tinted background that reflects the selection color. An active glass chip might go from bg-white/14 to bg-indigo-500/40 border-indigo-400/50.

For a tag cloud, you'll want spacing that lets the glass show context. Too tight and the blurred backgrounds start bleeding into each other visually, creating a muddy smear. An 8px gap between chips gives enough separation. If you're arranging them in a flex wrap container, gap-2 in Tailwind (which is 8px) is the right starting point.

You might also consider slightly varying the blur values across chips in a tag cloud — some at blur(8px), some at blur(12px) — to create a sense of depth. It sounds fussy, but it takes 30 seconds to implement with a data-blur attribute and CSS custom properties, and the result feels intentional rather than accidental. For the full list of pre-built glass components you can pull into a project, best free glassmorphism components is a good reference.

Accessibility Concerns with Glass Tag Components

This is where glass components can go sideways fast. The frosted effect looks great but rgba(255,255,255,0.14) text on a blurred background is not always going to pass WCAG AA contrast. You need to either ensure the text itself is high-contrast (pure white or near-black), or add a subtle text-shadow to lift it off whatever's behind.

For interactive chips — ones with keyboard focus, dismiss buttons, role of option or button — make sure your focus ring is visible. The default browser outline often disappears against a glass surface. A focus-visible:ring-2 focus-visible:ring-white/80 on the chip element gives a reliable outline that reads against any background color.

Does glass work with screen readers? Yes, as long as your markup is correct. Dismissable chips should have aria-label on the remove button ("Remove React tag" not just "×"). Status badges should use role="status" if they update dynamically. The visual style has zero bearing on screen reader behavior — that's purely a markup concern.

Performance Considerations for backdrop-filter at Scale

Each element with backdrop-filter triggers GPU compositing. One chip: no problem. A page with 200 chips visible simultaneously: worth profiling. The browser creates a separate compositing layer for each blurred element, which adds memory pressure. On mobile mid-range hardware, you'll notice jank during scroll if you have dense chip lists.

The fix is usually to move the blur to a container rather than individual chips. If you have a tag section on a card, apply backdrop-filter: blur(10px) to the card's tag section container, then give each chip a transparent-ish background that shows the container's frost. You get one compositing layer instead of N.

Worth also knowing: will-change: backdrop-filter doesn't actually help here and can make things worse by pre-allocating layers unnecessarily. Skip it. The only real optimization is reducing the number of elements that independently apply backdrop-filter.

FAQ

Why does backdrop-filter blur stop working when I set background: transparent?

backdrop-filter requires the element to have a non-fully-transparent background. With background: transparent, the browser skips compositing the backdrop filter entirely. Use a very low-opacity fill like rgba(255,255,255,0.01) minimum — that's enough to trigger the effect without visually changing the chip.

How do I make glass chips work in Safari on iOS?

You need the -webkit-backdrop-filter prefix alongside backdrop-filter. Safari added unprefixed support in v16, but older iOS devices still need the vendor prefix. Write both: backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); and you'll cover everything back to iOS 14.

What's the right blur value for small badge components?

Smaller surface area means the blur effect is less visible, so you typically need a higher value to compensate. For chips (24–32px tall) backdrop-blur-md (12px) works well. For tiny notification badges (16–20px), bump to blur(14px)–blur(16px). Beyond 20px blur on small elements starts looking soft and undefined.

Can I use glassmorphism chips inside a table or data grid without performance issues?

It depends on how many rows are visible. If you have 20–30 visible rows with 2–3 chips each, you're looking at 40–90 elements with backdrop-filter active simultaneously. That's usually fine on desktop. On mobile or if rows virtualize/scroll fast, move the blur to a row-level container instead of each chip. You drop from N compositing layers to 1 per row.

How do I handle the active/selected state for filter chips with glassmorphism?

Increase the background opacity and shift the hue. An unselected glass chip might be bg-white/14 border-white/20. Selected: bg-indigo-500/40 border-indigo-400/60. You can also slightly reduce the blur on selected chips (from blur-md to blur-sm) to make them feel more "solid" and selected — that subtle shift in material quality reads as state change.

Do glassmorphism chips look right on light-colored backgrounds?

Not by default. White fills on a white background give you almost no visible effect. For light mode you need to invert to dark fills — rgba(0,0,0,0.07) to rgba(0,0,0,0.12) with rgba(0,0,0,0.10) border. The text also needs to flip to near-black. Tailwind's dark: variants make this a one-liner per property once you know what values you're targeting.

Free components in 40 styles
React & Tailwind, copy-paste ready.
Browse →

Read next

Dark Mode Glassmorphism: Blur Effects That Work on Dark BgGlassmorphism Avatar Group: User List with Stacked DesignGlassmorphism vs Solid Design: Which Converts Better in 2027Glassmorphism Card Hover: Blur Depth Change on Mouse Enter