Tailwind UI Pattern Registry for humans and agents

cards accent glow glass feature icon per-card custom-property cards accent glow icon feature custom-property per-card feature cards with individual accent colors card grid with per-card color variable icon card with glow effect

Cards Glass Accent

Fetch pattern JSON: curl https://webspire.de/patterns/cards/glass-accent.json

Details

Family
cards
Tier
enhanced
Kind
section
Extends
cards/base
Responsive Dark Mode Tailwind Only SSR Safe Copy & Paste
Stable Published
cardsaccentglowglassfeatureiconper-cardcustom-property

Slots

Name Required Description
heading Yes Section title and optional description.
cards Yes Feature cards — each with icon, title, body, and learn-more link.

Props

Name Type Default Description
--card-accent color (per card) Per-card accent color driving icon, glow, badge, and link color.

The key technique: each <article> sets style="--card-accent: oklch(...);". Everything inside — the icon badge background (color-mix), the icon color, the ambient glow blob, and the “learn more” link — all consume var(--card-accent). Changing one inline variable recolors the entire card.

Adding a new card

<article
  class="group relative overflow-hidden rounded-2xl border p-6 ..."
  style="--card-accent: oklch(55% 0.2 320);">
  <!-- glow, icon badge, title, body, link — all use var(--card-accent) -->
</article>

Overriding accent from outside

<!-- From a parent container or design token -->
<div style="--card-accent: var(--brand-color);">
  <article class="...">...</article>
</div>