deepraj21

Glass Scroll Stack

Cards

About

A stack of glass cards that pin to the top as you scroll, shrinking and dimming as each new card lands on top of it.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Glass Scroll Stack to your project and fits it to your theme.

Code

How Glass Scroll Stack is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

import {
  GlassScrollStack,
  GlassScrollStackItem,
} from "@/components/ui/glass-scroll-stack";

const cards = [
  {
    title: "Bend",
    body: "Every surface refracts what's behind it.",
    accent: "#ff7ab6",
  },
  {
    title: "Tune",
    body: "Index of refraction, thickness, surface profile.",
    accent: "#7aa8ff",
  },
  {
    title: "Ship",
    body: "Install with the shadcn CLI and make it yours.",
    accent: "#ffc46b",
  },
  {
    title: "Repeat",
    body: "Fifty components and counting.",
    accent: "#5ef0c0",
  },
];

export default function GlassScrollStackDemo() {
  return (
    <GlassScrollStack
      height={380}
      className="w-full max-w-md px-1 pt-2"
      stackTop={12}
    >
      {cards.map((c, i) => (
        <GlassScrollStackItem
          key={c.title}
          className="flex h-56 flex-col justify-between"
        >
          <span className="text-[13px] font-semibold opacity-60">0{i + 1}</span>
          <div>
            <div
              className="text-[34px] font-semibold tracking-[-0.04em]"
              style={{ color: c.accent }}
            >
              {c.title}
            </div>
            <p className="text-[15px] opacity-75">{c.body}</p>
          </div>
        </GlassScrollStackItem>
      ))}
    </GlassScrollStack>
  );
}

More by deepraj21

View all
  • Glass Sidebar

    Glass Sidebar

    35
  • Glass Message

    Glass Message

    27
  • Glass Date Picker

    Glass Date Picker

    16
  • Glass Tab Bar

    Glass Tab Bar

    14
  • Glass QR Code

    Glass QR Code

    8
  • Glass Input

    Glass Input

    8
  • Glass Notification

    Glass Notification

    8
  • Glass Switch

    Glass Switch

    8

More in Cards

View all
  • Course Design Cards

    Course Design Cards

    1.3K
  • Statistics Card 7

    Statistics Card 7

    327
  • Statistics Card 2

    Statistics Card 2

    305
  • Interactive Tech Stack Bento Grid with Hover Effects

    Interactive Tech Stack Bento Grid with Hover Effects

    625
  • Card Studio

    Card Studio

    5
  • The Item one

    The Item one

    4
  • Weather Card

    Weather Card

    65
  • Card

    Card

    9