Skip to content
Haze UI

Liquid glass card

A plain Haze card surface (bordered, flat, no blur or glow) with an optional header, body slot and footer, shown as a compact music player.

pnpm dlx shadcn@latest add @haze/liquid-glass-card
Open preview in a new tab
Liveno JavaScript

When to use

  • A highlighted widget or feature card needs a flat bordered surface with an optional eyebrow, title, action and footer
  • You want a reusable card slot container that matches the Haze neutral surfaces in dark and light themes

When not to use

  • A plain content box with no header or footer structure is enough. Use card.
  • The surface is a media frame. Use frame.

Installation

Add the Haze registry to components.json once, then install Liquid glass card with the shadcn CLI. Works in any Astro project with Tailwind CSS v4.

pnpm dlx shadcn@latest add @haze/liquid-glass-card
First time? Registry and theme setup

1. Add to components.json:

{
  "registries": {
    "@haze": "http://localhost:4329/r/{name}.json"
  }
}

2. Install the theme once: npx shadcn@latest add @haze/theme, then import it after Tailwind in your global CSS:@import "./haze.css";

API reference

PropTypeDefaultDescription
idstring–Optional id on the card element.
eyebrowstring–Optional uppercase label rendered above the title; defaults to a sample label when no default slot is provided.
titlestring–Optional card heading text; defaults to a sample title when no default slot is provided.
descriptionstring–Optional supporting summary text under the heading.
padding"none" | "sm" | "md" | "lg""md"Internal spacing density for the card body and footer.
interactivebooleanfalseStrengthens the border on hover and focus when the card acts as an interactive surface.
headingLevel2 | 3 | 43Heading level for the optional card title.
classstring–Additional classes on the outer card element.

Accessibility

  • Uses solid card tokens with no blur or translucency, so copy keeps full contrast on any backdrop.
  • The demo scrubber is a native range input with an accessible label; play, previous and next are real buttons.

Notes for AI

Copy into Claude Code, Cursor, Codex or any coding agent. Agents can also read the Markdown version of this page.

  • Install and use

    Install the Haze UI component "Liquid glass card" with `npx shadcn@latest add @haze/liquid-glass-card`. If components.json has no "@haze" registry yet, add "registries": { "@haze": "http://localhost:4329/r/{name}.json" }. If src/styles/haze.css does not exist yet, run `npx shadcn@latest add @haze/theme` once and import it from the global stylesheet after Tailwind. The CLI stops at an overwrite question when a Haze file already exists and differs, even with --yes, and then installs nothing after it: read its output. If the user has not edited their Haze files, re-run with --overwrite to take the registry versions; if they have, ask them before overwriting. Then import LiquidGlassCard from "@/components/haze/ui/liquid-glass-card.astro" (or the relative path) and render it where it fits the page. Keep Haze token classes (bg-background, text-muted-foreground, border-border...) and never hardcode colors. Docs: http://localhost:4329/ui/liquid-glass-card.md

  • Customize with real content

    Adapt the Haze liquid-glass-card ui for our product. Replace the demo values of these props with our real content: id, eyebrow, title, description, padding, interactive, headingLevel, class. Keep the layout, the heading level rules and these accessibility details: Uses solid card tokens with no blur or translucency, so copy keeps full contrast on any backdrop. The demo scrubber is a native range input with an accessible label; play, previous and next are real buttons. Do not add raw color classes; use the Haze tokens.

  • Choose the right block

    Before using liquid-glass-card, check it fits: use it when a highlighted widget or feature card needs a flat bordered surface with an optional eyebrow, title, action and footer; you want a reusable card slot container that matches the haze neutral surfaces in dark and light themes. Avoid it when a plain content box with no header or footer structure is enough. use card.; the surface is a media frame. use frame.. Alternatives: @haze/card, @haze/bento-tile, @haze/frame.

Dependencies

  • @haze/utils
  • @haze/theme (one-time setup)

Source · Original Haze UI work.

Catalog

↑↓ moveEnter openEsc close

Keyboard shortcuts

CtrlK
Command palette
/
Focus search
←↑→↓
Move between cards
jk
Next / previous card
ci
Copy code / install command (detail page)
[]
Previous / next entry
?
This help
Esc
Close dialog