Glass Envelope

Pro

A frosted glass envelope with stacked photo cards that fan on hover, then lift from the frame when opened with a click.

illustrationglassenvelopemailphotoshovericoncard
Glass Envelope component preview

Overview

Glass Envelope is a React and Tailwind CSS icon card of a milky glass mail packet holding two photo cards, for gallery or inbox features, in Next.js or any React app. Hovering fans the photos, and clicking lifts them out of the frame until a second click tucks them back. The letter and each photo are real buttons with spoken labels, so it works from the keyboard, and reduced motion keeps the poses without the spring. Sender, subject, badge count, and glass tint are props. Only the first two images render, so extra images are never shown or fetched.

Installation

Run the following command

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

Usage

Import GlassEnvelope from @/components/wensity/glass-envelope 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 { GlassEnvelope } from "@/components/wensity/glass-envelope";
export default function Example() {
return (
<GlassEnvelope
from="Darkroom"
subject="Re: Prints"
count={36}
/>
);
}

Props

PropTypeDefaultDescription
sizenumber340Card edge length in pixels. Clamped to a 220 minimum.
fromstring"Darkroom"Sender line on the front letter.
subjectstring"Re: Prints"Subject line on the front letter.
imagesGlassEnvelopeImage[]Two Wensity landscape scansPhoto cards tucked in the envelope. Each needs src and alt. Only the first two are rendered.
countnumber36Badge count on the letter.
glassTintstring"#ffffff"Tint for the glass body and flap.
labelstringDerived from the sender and countAccessible name announced for the illustration.
  • Animated MacBook component preview

    Animated MacBook

    A closed MacBook that hinges open and powers on when you hover, in ten finishes.

  • iPhone Mockup component preview

    iPhone Mockup

    A thick, extruded iPhone with a machined side rail, side buttons, and lock screen.

  • Glass Capsule Stack component preview

    Glass Capsule Stack

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

  • Globe Card component preview

    Globe Card

    A dark icon card holding a dotted globe that slowly spins on its own axis.