Drop Gallery
imageProBilleder, der tabes ned i en fysikverden, hvor man kan samle dem op og kaste dem, med mus, touch eller tastatur.
Introduktionspris til og med 31. december 2026. Derefter 79 €.
Preview
Live demo. Temaet skifter selve demoen.
Kode
Koden er låst
Drop Gallery er en del af Manniche UI Pro. En nøgle åbner kildekoden til alle 66 effekter.
Køb · 49 €49 € · Introduktionspris til og med 31. december 2026. Derefter 79 €.
- Engangsbetaling
- Én udvikler
- Log ind og opret din nøgle med det samme
- Ingen moms (§ 19 UStG)
Har du en nøgle? Hent koden med CLI eller MCP.
Nøglen ligger i MANNICHE_PRO_KEY, aldrig i koden eller i adressen. Sådan sætter du den op
npx shadcn@latest add @manniche-pro/drop-galleryclaude mcp add --transport http manniche-ui https://mikkelmanniche.dk/api/mcp --header "Authorization: Bearer $MANNICHE_PRO_KEY"Props
DropGalleryProps
| Prop | Type | Standard | Hvad den gør |
|---|---|---|---|
images | DropGalleryImage[] | – | Pictures that fill the bodies, cycled across count. Without any, bodies are solid colours from colors. |
colors | string[] | – | Solid fill colours, used when there are no images or while an image is still loading. Any CSS colour, including var(--x). |
shape | 'circle' | 'square' | 'circle' | Shape of the bodies. |
count | number | 24 | How many bodies to drop. Fewer are used when the container is too small to hold them. |
size | number | 96 | Diameter (or side) of a body in CSS pixels. It shrinks a little on narrow containers. |
gravityX | number | 0 | Pull along the horizontal axis, from -1 (left) to 1 (right). |
gravityY | number | 1 | Pull along the vertical axis, from -1 (up) to 1 (down). |
gravityStrength | number | 1 | Overall strength of gravity, from 0 (weightless) to 3. |
walls | DropGalleryWalls | – | Which edges of the container are solid. Each side can be switched on or off on its own. Bodies that leave through an open side are gone until the next replay. |
friction | number | 0.3 | Surface friction, from 0 (ice) to 1 (rubber). Higher values make the pile settle faster. |
dragStiffness | number | 0.2 | How firmly a grabbed body follows the pointer, from 0.02 (rubber band) to 1 (rigid). |
angularStiffness | number | 0.25 | How firmly a grabbed body resists twisting while dragged, from 0 (spins freely) to 1. |
controls | boolean | true | Show the Shake and Drop again buttons. Without them the gallery itself takes a tab stop: Enter or Space shakes, the arrow keys push every body that way, R drops a fresh set, and each action is announced. |
children | ReactNode | – | Content drawn above the bodies. It ignores the pointer so bodies underneath stay draggable; switch pointer-events-auto back on for anything clickable. |
aria-label | string | – | Accessible name of the whole gallery. |
touchDrag | boolean | true | Touch behaviour. By default a finger that lands on a body picks it up and tosses it, while a finger that lands anywhere else scrolls the page as usual (the surface leaves touch-action alone and only claims the gesture when it starts on a body). Pass false to make touch never drag (mouse and pen still can). |
ref | Ref<DropGalleryHandle> | – | Ref with replay() and shake(). |
className | string | – | – |
A11y
Tastatur
With controls on, Shake and Drop again are buttons of at least 44 pixels, reachable with Tab and pressed with Enter or Space. With controls false the gallery itself takes focus: Enter or Space shakes, arrow keys push the pictures, R drops a fresh set, and each action is announced.
Skærmlæser
The gallery is a group named by aria-label. The canvas is aria-hidden and a hidden list gives each non-empty alt once.
Mindre bevægelse
Under reduced motion the pictures appear already settled and the loop runs only while dragging. The loop pauses while off screen or when the tab is hidden.