Components / Gallery
Polaroid Image
Free Gallery React component — PolaroidImageCard. MIT licensed, copy-paste ready for Next.js and Tailwind CSS.
Classic white polaroid with photo, caption, and date — slight tilt that straightens on hover. Nostalgic without feeling like a filter preset.
Preview

Golden hour, Kolkata ☀
June, 2026
Setup
How to use
Free for personal and commercial use. No UI attribution required. Include the MIT copyright notice when copying component source into your project. Read the MIT license.
- 1
Run in your terminal:
$npm install clsx tailwind-merge lucide-react - 2
Copy
lib/cn.tsbelow. Skip if you already havecn(). - 3
Copy the code below and create
components/gallery/polaroid-image-card.tsxin your project. - 4
Import and render:
Exampleimport { PolaroidImageCard } from "@/components/gallery/polaroid-image-card";
lib/cn.ts
import { type ClassValue, clsx } from "clsx";import { twMerge } from "tailwind-merge";export function cn(...inputs: ClassValue[]) {return twMerge(clsx(inputs));}
components/gallery/polaroid-image-card.tsx
import {forwardRef,type ComponentPropsWithoutRef,type ReactNode,} from "react";import Image from "next/image";import { cn } from "@/lib/cn";export type PolaroidImageCardProps = Readonly<{image?: string;imageAlt?: string;caption?: string;date?: string;rotate?: boolean;children?: ReactNode;} & ComponentPropsWithoutRef<"div">>;// Production-ready Polaroid Image component — styled with Tailwind CSS.export const PolaroidImageCard = forwardRef<HTMLDivElement,PolaroidImageCardProps>(({className,image = "/wallpaper-3.png",imageAlt = "Polaroid photo",caption = "Golden hour, Kolkata ☀",date = "June, 2026",rotate = true,children,...props},ref,) => {return (<divref={ref}data-slot="polaroid-image-card"className={cn("group w-56", className)}{...props}><divclassName={cn("bg-white p-3 pb-10 shadow-[0_8px_30px_rgba(0,0,0,0.12)] transition-transform duration-500 ease-out",rotate ? "-rotate-2 group-hover:rotate-0" : "",)}>{/* Image */}<div className="relative aspect-square w-full overflow-hidden bg-neutral-100"><Imagesrc={image}alt={imageAlt}fillsizes="224px"className="object-cover sepia-[0.15] transition-all duration-500 group-hover:sepia-0"/></div>{/* Caption */}<p className="mt-4 text-center font-serif text-sm text-neutral-600 italic">{caption}</p>{/* Date */}<p className="mt-0.5 text-center font-mono text-[10px] text-neutral-400">{date}</p>{/* Optional slot (future extension) */}{children}</div></div>);},);PolaroidImageCard.displayName = "PolaroidImageCard";