Ruixen Pro is now live.50+ premium components, templates, blocks, and lifetime updates.

Command Palette

Search for a command to run...

Docs
Glass AI Card

Glass AI Card

iOS 26 liquid-glass content card with animated skeleton lines and a hue-rotating gradient AI action button.

Installation

Usage

import GlassAICard from "@/components/ruixen/glass-ai-card";
 
export default function App() {
  return (
    <GlassAICard
      actionLabel="Summarize"
      onAction={() => console.log("AI action")}
    />
  );
}

Props

PropTypeDefaultDescription
linesnumber[][]See belowSkeleton line widths per group
actionLabelstring"Summarize"Label for the action button
onAction() => void-Callback when the action button clicks
soundbooleantrueEnable haptic sound on click
styleCSSProperties-Additional styles for the card

Default Lines Layout

const DEFAULT_LINES = [
  [100], // full-width line
  [40, 20, 40], // three segments
  [40, 20], // two segments
  [20, 80], // two segments
];

Features

  • Dual-palette theme — automatic light/dark with CSS custom properties
  • Shimmer animation — skeleton lines sweep with staggered timing
  • Hue-rotating gradient border — pink-to-purple animated ring on the action button
  • Sparkles icon — inline SVG, no icon library needed
  • Haptic sound — 3ms white noise burst on button click
  • Spring physics — button scales with spring animation on tap