Glass Capsule Stack

Pro

A frosted glass tube that stacks feature chips and drops the oldest into a card.

illustrationsglasshopperframer motiontabler icons react
Glass Capsule Stack component preview

Overview

Glass Capsule Stack is a React and Tailwind CSS feature showcase for landing pages that drops your feature chips into a frosted glass tube, in Next.js or any React app, animated with Framer Motion. On each beat a chip falls in with a small squash, the stack settles, and the oldest chip squeezes out of the floor into a featured card. The loop stops off screen, in background tabs, for reduced motion, or with paused, and screen readers get the chips as a plain list. Keep at least one more chip than stackSize, or the stack shrinks to avoid repeats.

Installation

Run the following command

~/your-project
pnpm dlx wensity@latest add glass-hopper

Usage

Import GlassHopper from @/components/wensity/glass-hopper and render it anywhere in your React or Next.js app. The source lands in your own repo, so every prop, class and animation below is yours to edit.

app/example.tsx
"use client";
import { GlassHopper } from "@/components/wensity/glass-hopper";
import { IconBolt, IconShieldCheck, IconSparkles, IconUsers } from "@tabler/icons-react";
export default function Example() {
return (
<GlassHopper
intervalMs={2200}
stackSize={3}
chips={[
{
id: "ready",
title: "Production Ready",
description: "Fully type-safe and tested",
icon: <IconShieldCheck className="size-5" stroke={1.75} />,
},
{
id: "motion",
title: "Fluid Motion",
description: "60fps optimizations built-in",
icon: <IconBolt className="size-5" stroke={1.75} />,
},
{
id: "a11y",
title: "Accessible",
description: "Works perfectly for everyone",
icon: <IconUsers className="size-5" stroke={1.75} />,
},
{
id: "design",
title: "Modern Design",
description: "Crafted for high-end feel",
icon: <IconSparkles className="size-5" stroke={1.75} />,
},
]}
/>
);
}

Props

PropTypeDefaultDescription
chipsGlassHopperChip[]-Feature chips that cycle through the capsule. Each needs id, title, description, and icon. Pass at least one more chip than stackSize so the tray never repeats a stacked chip.
intervalMsnumber2200Milliseconds between drops.
pausedbooleanfalsePause the drop loop without unmounting.
stackSizenumber3Chips stacked inside the capsule, clamped to 2-5. Also sets the tube height.
glassTintstring"#ffffff"Tint for the glass tube, rim, and sheen.
accentColorstring"#cd1c18"Accent color for icon badges and the slot light.