Website kits › Socket › Compare
Up to three products spec by spec; the better value in each row lifts, and Differences only folds the rest away.
Compare is a comparison from Socket, a website kit with 5 pages: A working electronics store: pin any three to compare spec by spec, delivery dates by city, one shared bag. Price: $5 for the whole pack.
Built with: compare engine, better-value marks, row folding.
Code: React and Next.js (TypeScript), Vue 3, plain HTML/CSS/JS, Tailwind CSS v4 and Motion (motion.dev). No npm packages needed. Keyboard accessible, with a reduced-motion version, in dark and light.
| Prop | Type | Default | Description |
|---|---|---|---|
dark | boolean | ||
photos | Record<string | ||
ids | string[] | Product ids to compare (otherwise the visitor's pinned list). | |
autoplay | boolean | ||
seed | boolean | ||
onNavigate | (page: string) => void |
set(ids: string[]): voiddifferencesOnly(on: boolean): voiddestroy(): voidimport SocketCompare from './SocketCompare';
<SocketCompare />The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.
Good for: Electronics store website, UK (pounds).