Particle Mesh Gallery
An image-colored particle sphere unfolds into a portrait on tap and gathers back on double tap, with original landscape art and a quiet project index.
Try it: Tap to reveal; double tap to reform. Enter/Space toggles, Escape reforms, and left/right arrows browse. Pause stops rotation.
Installation
Install with the shadcn CLI:
npx shadcn@latest add https://www.framekitui.live/r/particle-mesh-gallery.jsonOr, with the @framekit namespace registered: npx shadcn@latest add @framekit/particle-mesh-gallery. You can also copy the source into components/ui/particle-mesh-gallery.tsx (view on GitHub).
Usage
import { ParticleMeshGallery } from '@/components/ui/particle-mesh-gallery'Props
| Prop | Type | Default | Notes |
|---|---|---|---|
items | ParticleMeshItem[] | 3 generated landscapes | Unique id, title, category?, src?, alt?, seed?. Images are portrait-cropped; use same-origin or CORS-enabled URLs. Failed images use generated art. Empty arrays show an empty state. |
value / defaultValue | string | — | Controlled / initial selected item ID. Unknown IDs fall back to the first item. |
onValueChange | (id: string) => void | — | Requested selection change. |
revealed / defaultRevealed | boolean | false | Controlled / initial image state. False shows the sphere. |
onRevealedChange | (revealed: boolean) => void | — | Requested image/particle state change. |
particleCount | number | 4200 | Approximate point count, clamped to 600–6000. Lower this on constrained devices. |
autoRotate | boolean | true | Slow ambient rotation with a visible pause button. Suspends offscreen and in hidden tabs. |
theme | 'auto' | 'light' | 'dark' | 'auto' | Follows the nearest theme scope or forces both canvas and surface colors. |
label | string | 'Selected work' | Visible eyebrow and accessible gallery name. |
className | string | — | Root layout overrides. |
Dependencies
motionlucide-react
Related Portfolio components
- Project Reveal List
An editorial project index: rows dim their siblings and nudge on hover while a tilting preview chases the cursor on a spring and unmasks with a clip-path. Touch gets inline thumbnails.
- Dealer Deck Testimonials
Testimonials dealt like playing cards: the top card of a face-down deck slides across the table on a spring, flips face-up mid-flight and lands slightly askew on the pile. Take one back or gather…
- Project Filter Gallery
Category chips share a sliding pill (layout animation) while the grid reflows: survivors glide to new cells, newcomers bloom in blur-to-sharp. Announces the result count.
- Image Lens
A glass loupe that follows the pointer and magnifies the image beneath it: the rim refracts and fringes like real glass, the rest of the frame softly desaturates, and pinch, ctrl+wheel or a click…
- Case Study Scroll
Problem → Process → Result as a scroll-driven story: a sticky rail fills as you read and lights the current chapter while chapters rise in with staggered key figures.
- Discovery Scene
An illustrated desk (night in dark mode, daylight in light) with six hidden sparkles. Each find lights its object — lamp, steam, spinning record — reveals a fact, and counts toward “found 6 / 6”.…