Patti Supply
/
Perspective Gallery

Perspective Gallery

Preview

Installation

Copy the element to Webflow

Copy to Webflow
Copied to clipboard!
{"type":"@webflow/XscpData","payload":{"nodes":[{"_id":"10ed760e-8e3c-5b04-20bc-7b0f983850e7","type":"Block","tag":"div","classes":["c129cb1b-b388-e5f2-3c1c-7b7c17d09791"],"children":["7ddaf14c-a761-2f26-e9ae-8cca63da39c7","5976f100-b546-e3bd-bf41-e2788a4041b3"],"data":{"tag":"div","text":false,"xattr":[{"name":"data-perspective-gallery","value":"true"},{"name":"role","value":"group"},{"name":"aria-label","value":"Perspective gallery"}],"devlink":{"runtimeProps":{},"slot":""},"displayName":"","attr":{"id":""},"search":{"exclude":false},"visibility":{"conditions":[],"keepInHtml":{"tag":"False","val":{}}}}},{"_id":"7ddaf14c-a761-2f26-e9ae-8cca63da39c7","type":"HtmlEmbed","meta":{"displayName":"p005-gallery-css"},"tag":"div","classes":[],"children":[],"v":"","data":{"search":{"exclude":true},"embed":{"type":"html","meta":{"html":"","div":false,"script":false,"compilable":false,"iframe":false}},"insideRTE":false,"content":"<style>\n /* Gallery settings */\n .p005-gallery {\n --gallery-angle: 10deg;\n --gallery-overlap: -7rem;\n }\n\n /* Layout */\n .p005-gallery_list {\n transform: rotateZ(var(--gallery-angle));\n }\n\n .p005-gallery_item {\n position: relative;\n z-index: 1;\n cursor: pointer;\n }\n\n .p005-gallery_item + .p005-gallery_item {\n margin-left: var(--gallery-overlap);\n }\n\n /* Image perspective */\n .p005-gallery_image {\n --image-lift: 0rem;\n --image-depth: 0px;\n --image-rotation: -30deg;\n --image-skew: -16deg;\n\n transform: perspective(2000px) translateY(var(--image-lift)) translateZ(var(--image-depth)) rotateZ(calc(-1 * var(--gallery-angle))) rotateY(var(--image-rotation)) skewY(var(--image-skew));\n\n transition:\n transform 0.65s cubic-bezier(0.22, 1, 0.36, 1),\n filter 0.4s ease;\n\n pointer-events: none;\n }\n\n /* Active and keyboard states */\n .p005-gallery_item:is(.is-active, :focus-visible) {\n z-index: 2;\n }\n\n .p005-gallery_item:is(.is-active, :focus-visible) .p005-gallery_image {\n --image-lift: -2rem;\n --image-depth: 100px;\n --image-rotation: 0deg;\n --image-skew: 0deg;\n }\n\n .p005-gallery_list:has(.p005-gallery_item:is(.is-active, :focus-visible)) .p005-gallery_item:not(.is-active, :focus-visible) .p005-gallery_image {\n filter: brightness(0.6);\n }\n\n /* Hover interaction */\n @media (hover: hover) and (pointer: fine) {\n .p005-gallery_item:hover {\n z-index: 3;\n }\n\n .p005-gallery_item:hover .p005-gallery_image {\n --image-lift: -2rem;\n --image-depth: 100px;\n --image-rotation: 0deg;\n --image-skew: 0deg;\n\n filter: brightness(1);\n }\n\n .p005-gallery_list:has(.p005-gallery_item:hover) .p005-gallery_item:not(:hover) .p005-gallery_image {\n filter: brightness(0.6);\n }\n }\n\n /* Keyboard focus indicator */\n .p005-gallery_item:focus-visible {\n outline: none;\n }\n\n .p005-gallery_item:focus-visible .p005-gallery_image {\n outline: 2px solid #fff;\n outline-offset: 4px;\n }\n\n /* Responsive scaling */\n @media screen and (max-width: 991px) {\n .p005-gallery {\n --gallery-count: 6;\n --gallery-card-width: min(16rem, calc(88vw / (1 + (var(--gallery-count) - 1) * 0.5652)));\n --gallery-overlap: calc(var(--gallery-card-width) * -0.4348);\n }\n\n .p005-gallery_item {\n width: var(--gallery-card-width);\n }\n }\n\n /* Reduced motion */\n @media (prefers-reduced-motion: reduce) {\n .p005-gallery_image {\n transition: none;\n }\n }\n</style>","devlink":{"runtimeProps":{},"slot":""},"displayName":"","attr":{"id":""},"xattr":[],"visibility":{"conditions":[],"keepInHtml":{"tag":"False","val":{}}}}},{"_id":"5976f100-b546-e3bd-bf41-e2788a4041b3","type":"Block","tag":"div","classes":["d7b55866-9ebd-2795-c88c-4bdde8335ae9"],"children":["5c3cafb4-2ad7-265b-91dc-5ce6a6ebed9f"],"data":{"tag":"div","text":false,"devlink":{"runtimeProps":{},"slot":""},"displayName":"","attr":{"id":""},"xattr":[],"search":{"exclude":false},"visibility":{"conditions":[],"keepInHtml":{"tag":"False","val":{}}}}},{"_id":"5c3cafb4-2ad7-265b-91dc-5ce6a6ebed9f","type":"Block","tag":"div","classes":["a9fd94a8-258c-cc74-54e6-39a512be5ce7"],"children":["d2bcd0bd-5f7b-17d2-6884-04ee368725d7","ef1cb06e-c452-9ace-a523-8182789c4ce4","e3e373c8-10bf-426d-13f6-e71da032704f","adacbab6-d66b-4c51-a588-b4964c215595","d5a1e19b-ea08-16c4-3135-f624fba91fd5","a54f7fd0-f716-1dd9-1f01-80a40de0e063"],"data":{"tag":"div","text":false,"devlink":{"runtimeProps":{},"slot":""},"displayName":"","attr":{"id":""},"xattr":[],"search":{"exclude":false},"visibility":{"conditions":[],"keepInHtml":{"tag":"False","val":{}}}}},{"_id":"d2bcd0bd-5f7b-17d2-6884-04ee368725d7","type":"Block","tag":"div","classes":["50489ffb-66c2-aee5-d758-550ad418e664"],"children":["5e5ac0af-42ff-f499-1ab6-2b1258f46fcb"],"data":{"tag":"div","text":false,"xattr":[{"name":"data-perspective-item","value":"true"},{"name":"tabindex","value":"0"}],"devlink":{"runtimeProps":{},"slot":""},"displayName":"","attr":{"id":""},"search":{"exclude":false},"visibility":{"conditions":[],"keepInHtml":{"tag":"False","val":{}}}}},{"_id":"5e5ac0af-42ff-f499-1ab6-2b1258f46fcb","type":"Image","tag":"img","classes":["839ab505-8122-e906-1f36-8a81e1cc76d1"],"children":[],"data":{"attr":{"src":"https://cdn.prod.website-files.com/6b103c97c772e0b7fd40dd58/6b10400afbcc9f5fbc38bc43_alessio-soggetti-x8GFIajIq6M-unsplash.webp","loading":"lazy","width":"auto","height":"auto","alt":"__wf_reserved_inherit","id":""},"img":{"id":"6b10400afbcc9f5fbc38bc43"},"srcsetDisabled":false,"sizes":[{"max":10000,"size":"100vw"}],"devlink":{"runtimeProps":{},"slot":""},"displayName":"","xattr":[],"search":{"exclude":false},"visibility":{"conditions":[],"keepInHtml":{"tag":"False","val":{}}}}},{"_id":"ef1cb06e-c452-9ace-a523-8182789c4ce4","type":"Block","tag":"div","classes":["50489ffb-66c2-aee5-d758-550ad418e664"],"children":["3c9d8422-e36d-32b1-a1bf-7dfb70b2dcda"],"data":{"tag":"div","text":false,"xattr":[{"name":"data-perspective-item","value":"true"},{"name":"tabindex","value":"0"}],"devlink":{"runtimeProps":{},"slot":""},"displayName":"","attr":{"id":""},"search":{"exclude":false},"visibility":{"conditions":[],"keepInHtml":{"tag":"False","val":{}}}}},{"_id":"3c9d8422-e36d-32b1-a1bf-7dfb70b2dcda","type":"Image","tag":"img","classes":["839ab505-8122-e906-1f36-8a81e1cc76d1"],"children":[],"data":{"attr":{"src":"https://cdn.prod.website-files.com/6b103c97c772e0b7fd40dd58/6b10400a8a49ea74b1b8a4c7_wolfgang-hasselmann-Fd01B6nNPbo-unsplash.webp","loading":"lazy","width":"auto","height":"auto","alt":"__wf_reserved_inherit","id":""},"img":{"id":"6b10400a8a49ea74b1b8a4c7"},"srcsetDisabled":false,"sizes":[{"max":10000,"size":"100vw"}],"devlink":{"runtimeProps":{},"slot":""},"displayName":"","xattr":[],"search":{"exclude":false},"visibility":{"conditions":[],"keepInHtml":{"tag":"False","val":{}}}}},{"_id":"e3e373c8-10bf-426d-13f6-e71da032704f","type":"Block","tag":"div","classes":["50489ffb-66c2-aee5-d758-550ad418e664"],"children":["e8a2db99-c405-1d0b-33fd-87b4eb8e9309"],"data":{"tag":"div","text":false,"xattr":[{"name":"data-perspective-item","value":"true"},{"name":"tabindex","value":"0"}],"devlink":{"runtimeProps":{},"slot":""},"displayName":"","attr":{"id":""},"search":{"exclude":false},"visibility":{"conditions":[],"keepInHtml":{"tag":"False","val":{}}}}},{"_id":"e8a2db99-c405-1d0b-33fd-87b4eb8e9309","type":"Image","tag":"img","classes":["839ab505-8122-e906-1f36-8a81e1cc76d1"],"children":[],"data":{"attr":{"src":"https://cdn.prod.website-files.com/6b103c97c772e0b7fd40dd58/6b10400a140284fe6595c394_degleex-ganzorig-wQImoykAwGs-unsplash.webp","loading":"lazy","width":"auto","height":"auto","alt":"__wf_reserved_inherit","id":""},"img":{"id":"6b10400a140284fe6595c394"},"srcsetDisabled":false,"sizes":[{"max":10000,"size":"100vw"}],"devlink":{"runtimeProps":{},"slot":""},"displayName":"","xattr":[],"search":{"exclude":false},"visibility":{"conditions":[],"keepInHtml":{"tag":"False","val":{}}}}},{"_id":"adacbab6-d66b-4c51-a588-b4964c215595","type":"Block","tag":"div","classes":["50489ffb-66c2-aee5-d758-550ad418e664"],"children":["6f754754-8f07-e572-d238-dbdbecaa530f"],"data":{"tag":"div","text":false,"xattr":[{"name":"data-perspective-item","value":"true"},{"name":"tabindex","value":"0"}],"devlink":{"runtimeProps":{},"slot":""},"displayName":"","attr":{"id":""},"search":{"exclude":false},"visibility":{"conditions":[],"keepInHtml":{"tag":"False","val":{}}}}},{"_id":"6f754754-8f07-e572-d238-dbdbecaa530f","type":"Image","tag":"img","classes":["839ab505-8122-e906-1f36-8a81e1cc76d1"],"children":[],"data":{"attr":{"src":"https://cdn.prod.website-files.com/6b103c97c772e0b7fd40dd58/6b10400a3b95a25c8fe513c1_james-eades-RVX2STx44UI-unsplash.webp","loading":"lazy","width":"auto","height":"auto","alt":"__wf_reserved_inherit","id":""},"img":{"id":"6b10400a3b95a25c8fe513c1"},"srcsetDisabled":false,"sizes":[{"max":10000,"size":"100vw"}],"devlink":{"runtimeProps":{},"slot":""},"displayName":"","xattr":[],"search":{"exclude":false},"visibility":{"conditions":[],"keepInHtml":{"tag":"False","val":{}}}}},{"_id":"d5a1e19b-ea08-16c4-3135-f624fba91fd5","type":"Block","tag":"div","classes":["50489ffb-66c2-aee5-d758-550ad418e664"],"children":["4e007037-2388-905d-1692-d563c63a9a80"],"data":{"tag":"div","text":false,"xattr":[{"name":"data-perspective-item","value":"true"},{"name":"tabindex","value":"0"}],"devlink":{"runtimeProps":{},"slot":""},"displayName":"","attr":{"id":""},"search":{"exclude":false},"visibility":{"conditions":[],"keepInHtml":{"tag":"False","val":{}}}}},{"_id":"4e007037-2388-905d-1692-d563c63a9a80","type":"Image","tag":"img","classes":["839ab505-8122-e906-1f36-8a81e1cc76d1"],"children":[],"data":{"attr":{"src":"https://cdn.prod.website-files.com/6b103c97c772e0b7fd40dd58/6b10400a2da1b0678c7c0b0b_finding-dan-dan-grinwis-O35rT6OytRo-unsplash.webp","loading":"lazy","width":"auto","height":"auto","alt":"__wf_reserved_inherit","id":""},"img":{"id":"6b10400a2da1b0678c7c0b0b"},"srcsetDisabled":false,"sizes":[{"max":10000,"size":"100vw"}],"devlink":{"runtimeProps":{},"slot":""},"displayName":"","xattr":[],"search":{"exclude":false},"visibility":{"conditions":[],"keepInHtml":{"tag":"False","val":{}}}}},{"_id":"a54f7fd0-f716-1dd9-1f01-80a40de0e063","type":"Block","tag":"div","classes":["50489ffb-66c2-aee5-d758-550ad418e664"],"children":["417f81cd-e44d-8c3b-e37f-3ef0ae43eb37"],"data":{"tag":"div","text":false,"xattr":[{"name":"data-perspective-item","value":"true"},{"name":"tabindex","value":"0"}],"devlink":{"runtimeProps":{},"slot":""},"displayName":"","attr":{"id":""},"search":{"exclude":false},"visibility":{"conditions":[],"keepInHtml":{"tag":"False","val":{}}}}},{"_id":"417f81cd-e44d-8c3b-e37f-3ef0ae43eb37","type":"Image","tag":"img","classes":["839ab505-8122-e906-1f36-8a81e1cc76d1"],"children":[],"data":{"attr":{"src":"https://cdn.prod.website-files.com/6b103c97c772e0b7fd40dd58/6b10400a014214ac52e74b46_jonathan-borba-VRDDmrUx9o8-unsplash.webp","loading":"lazy","width":"auto","height":"auto","alt":"__wf_reserved_inherit","id":""},"img":{"id":"6b10400a014214ac52e74b46"},"srcsetDisabled":false,"sizes":[{"max":10000,"size":"100vw"}],"devlink":{"runtimeProps":{},"slot":""},"displayName":"","xattr":[],"search":{"exclude":false},"visibility":{"conditions":[],"keepInHtml":{"tag":"False","val":{}}}}}],"styles":[{"_id":"c129cb1b-b388-e5f2-3c1c-7b7c17d09791","fake":false,"type":"class","name":"p005-gallery","namespace":"","comb":"","styleLess":"position: relative; display: flex; overflow: hidden; width: 100%; min-height: 100svh; flex-direction: column; justify-content: center; flex-wrap: nowrap; align-items: center; background-color: hsla(207.50000000000003, 75.00%, 6.27%, 1.00);","variants":{},"children":[],"createdBy":"6a524a3cbc0fac0d25bf4b97","origin":null,"selector":null},{"_id":"d7b55866-9ebd-2795-c88c-4bdde8335ae9","fake":false,"type":"class","name":"p005-gallery_scene","namespace":"","comb":"","styleLess":"position: relative; display: flex; overflow: visible; width: 100%; justify-content: center; align-items: center;","variants":{"medium":{"styleLess":"padding-top: 6rem; padding-right: 0rem; padding-bottom: 6rem; padding-left: 0rem;"}},"children":[],"createdBy":"6a524a3cbc0fac0d25bf4b97","origin":null,"selector":null},{"_id":"a9fd94a8-258c-cc74-54e6-39a512be5ce7","fake":false,"type":"class","name":"p005-gallery_list","namespace":"","comb":"","styleLess":"position: relative; display: flex; width: auto; justify-content: center; align-items: center;","variants":{"medium":{"styleLess":"width: 100%; justify-content: space-between; align-items: center; flex-grow: 0; flex-shrink: 0; flex-basis: auto;"},"small":{"styleLess":"padding-top: 1rem; padding-right: 1rem; padding-bottom: 1rem; justify-content: space-between;"}},"children":[],"createdBy":"6a524a3cbc0fac0d25bf4b97","origin":null,"selector":null},{"_id":"50489ffb-66c2-aee5-d758-550ad418e664","fake":false,"type":"class","name":"p005-gallery_item","namespace":"","comb":"","styleLess":"position: relative; overflow: visible; width: 18rem; flex-grow: 0; flex-shrink: 0; flex-basis: auto; aspect-ratio: 2/3;","variants":{"medium":{"styleLess":"width: 14rem;"},"tiny":{"styleLess":"width: 10rem;"},"small":{"styleLess":"width: 12rem;"}},"children":[],"createdBy":"6a524a3cbc0fac0d25bf4b97","origin":null,"selector":null},{"_id":"839ab505-8122-e906-1f36-8a81e1cc76d1","fake":false,"type":"class","name":"p005-gallery_image","namespace":"","comb":"","styleLess":"display: block; width: 100%; height: 100%; object-fit: cover;","variants":{},"children":[],"createdBy":"6a524a3cbc0fac0d25bf4b97","origin":null,"selector":null}],"assets":[{"cdnUrl":"https://cdn.prod.website-files.com/6b103c97c772e0b7fd40dd58/6b10400afbcc9f5fbc38bc43_alessio-soggetti-x8GFIajIq6M-unsplash.webp","siteId":"6b103c97c772e0b7fd40dd58","width":800,"isHD":false,"height":1200,"fileName":"6b10400afbcc9f5fbc38bc43_alessio-soggetti-x8GFIajIq6M-unsplash.webp","createdOn":"2026-12-02T15:58:02.690Z","origFileName":"alessio-soggetti-x8GFIajIq6M-unsplash.webp","fileHash":"b6140fd062a2bcfc4629dbf7f2eab7bc","translationLoading":false,"variants":[{"s3Url":"https://s3.amazonaws.com/webflow-prod-assets/6b103c97c772e0b7fd40dd58/6b10400afbcc9f5fbc38bc43_alessio-soggetti-x8GFIajIq6M-unsplash-p-500.webp","origFileName":"alessio-soggetti-x8GFIajIq6M-unsplash-p-500.webp","fileName":"6b10400afbcc9f5fbc38bc43_alessio-soggetti-x8GFIajIq6M-unsplash-p-500.webp","format":"webp","width":500,"size":27140,"quality":100,"cdnUrl":"https://cdn.prod.website-files.com/6b103c97c772e0b7fd40dd58/6b10400afbcc9f5fbc38bc43_alessio-soggetti-x8GFIajIq6M-unsplash-p-500.webp","_id":"6b10400c6ab935e3fb59db0c"}],"mimeType":"image/webp","isFromWellKnownFolder":false,"s3Url":"https://s3.amazonaws.com/webflow-prod-assets/6b103c97c772e0b7fd40dd58/6b10400afbcc9f5fbc38bc43_alessio-soggetti-x8GFIajIq6M-unsplash.webp","thumbUrl":"https://cdn.prod.website-files.com/6b103c97c772e0b7fd40dd58/6b10400afbcc9f5fbc38bc43_alessio-soggetti-x8GFIajIq6M-unsplash.webp","_id":"6b10400afbcc9f5fbc38bc43","updatedOn":"2026-12-02T15:58:04.170Z","fileSize":50300,"localizedSettings":{}},{"cdnUrl":"https://cdn.prod.website-files.com/6b103c97c772e0b7fd40dd58/6b10400a8a49ea74b1b8a4c7_wolfgang-hasselmann-Fd01B6nNPbo-unsplash.webp","siteId":"6b103c97c772e0b7fd40dd58","width":800,"isHD":false,"height":1200,"fileName":"6b10400a8a49ea74b1b8a4c7_wolfgang-hasselmann-Fd01B6nNPbo-unsplash.webp","createdOn":"2026-12-02T15:58:02.688Z","origFileName":"wolfgang-hasselmann-Fd01B6nNPbo-unsplash.webp","fileHash":"f9bc49dd5c200772d8ffe8e9c0fdfe85","translationLoading":false,"variants":[{"s3Url":"https://s3.amazonaws.com/webflow-prod-assets/6b103c97c772e0b7fd40dd58/6b10400a8a49ea74b1b8a4c7_wolfgang-hasselmann-Fd01B6nNPbo-unsplash-p-500.webp","origFileName":"wolfgang-hasselmann-Fd01B6nNPbo-unsplash-p-500.webp","fileName":"6b10400a8a49ea74b1b8a4c7_wolfgang-hasselmann-Fd01B6nNPbo-unsplash-p-500.webp","format":"webp","width":500,"size":8884,"quality":100,"cdnUrl":"https://cdn.prod.website-files.com/6b103c97c772e0b7fd40dd58/6b10400a8a49ea74b1b8a4c7_wolfgang-hasselmann-Fd01B6nNPbo-unsplash-p-500.webp","_id":"6b10400b6ab935e3fb59daf9"}],"mimeType":"image/webp","isFromWellKnownFolder":false,"s3Url":"https://s3.amazonaws.com/webflow-prod-assets/6b103c97c772e0b7fd40dd58/6b10400a8a49ea74b1b8a4c7_wolfgang-hasselmann-Fd01B6nNPbo-unsplash.webp","thumbUrl":"https://cdn.prod.website-files.com/6b103c97c772e0b7fd40dd58/6b10400a8a49ea74b1b8a4c7_wolfgang-hasselmann-Fd01B6nNPbo-unsplash.webp","_id":"6b10400a8a49ea74b1b8a4c7","updatedOn":"2026-12-02T15:58:03.971Z","fileSize":14752,"localizedSettings":{}},{"cdnUrl":"https://cdn.prod.website-files.com/6b103c97c772e0b7fd40dd58/6b10400a140284fe6595c394_degleex-ganzorig-wQImoykAwGs-unsplash.webp","siteId":"6b103c97c772e0b7fd40dd58","width":800,"isHD":false,"height":1200,"fileName":"6b10400a140284fe6595c394_degleex-ganzorig-wQImoykAwGs-unsplash.webp","createdOn":"2026-12-02T15:58:02.734Z","origFileName":"degleex-ganzorig-wQImoykAwGs-unsplash.webp","fileHash":"496baa9306e2345963291123c5d98189","translationLoading":false,"variants":[{"s3Url":"https://s3.amazonaws.com/webflow-prod-assets/6b103c97c772e0b7fd40dd58/6b10400a140284fe6595c394_degleex-ganzorig-wQImoykAwGs-unsplash-p-500.webp","origFileName":"degleex-ganzorig-wQImoykAwGs-unsplash-p-500.webp","fileName":"6b10400a140284fe6595c394_degleex-ganzorig-wQImoykAwGs-unsplash-p-500.webp","format":"webp","width":500,"size":77908,"quality":100,"cdnUrl":"https://cdn.prod.website-files.com/6b103c97c772e0b7fd40dd58/6b10400a140284fe6595c394_degleex-ganzorig-wQImoykAwGs-unsplash-p-500.webp","_id":"6b10400ccfd09736db9de766"}],"mimeType":"image/webp","isFromWellKnownFolder":false,"s3Url":"https://s3.amazonaws.com/webflow-prod-assets/6b103c97c772e0b7fd40dd58/6b10400a140284fe6595c394_degleex-ganzorig-wQImoykAwGs-unsplash.webp","thumbUrl":"https://cdn.prod.website-files.com/6b103c97c772e0b7fd40dd58/6b10400a140284fe6595c394_degleex-ganzorig-wQImoykAwGs-unsplash.webp","_id":"6b10400a140284fe6595c394","updatedOn":"2026-12-02T15:58:04.516Z","fileSize":150232,"localizedSettings":{}},{"cdnUrl":"https://cdn.prod.website-files.com/6b103c97c772e0b7fd40dd58/6b10400a3b95a25c8fe513c1_james-eades-RVX2STx44UI-unsplash.webp","siteId":"6b103c97c772e0b7fd40dd58","width":800,"isHD":false,"height":1200,"fileName":"6b10400a3b95a25c8fe513c1_james-eades-RVX2STx44UI-unsplash.webp","createdOn":"2026-12-02T15:58:02.717Z","origFileName":"james-eades-RVX2STx44UI-unsplash.webp","fileHash":"2603970a7b04f271a7e90a8c4961b9ef","translationLoading":false,"variants":[{"s3Url":"https://s3.amazonaws.com/webflow-prod-assets/6b103c97c772e0b7fd40dd58/6b10400a3b95a25c8fe513c1_james-eades-RVX2STx44UI-unsplash-p-500.webp","origFileName":"james-eades-RVX2STx44UI-unsplash-p-500.webp","fileName":"6b10400a3b95a25c8fe513c1_james-eades-RVX2STx44UI-unsplash-p-500.webp","format":"webp","width":500,"size":115300,"quality":100,"cdnUrl":"https://cdn.prod.website-files.com/6b103c97c772e0b7fd40dd58/6b10400a3b95a25c8fe513c1_james-eades-RVX2STx44UI-unsplash-p-500.webp","_id":"6b10400c014214ac52e74bbe"}],"mimeType":"image/webp","isFromWellKnownFolder":false,"s3Url":"https://s3.amazonaws.com/webflow-prod-assets/6b103c97c772e0b7fd40dd58/6b10400a3b95a25c8fe513c1_james-eades-RVX2STx44UI-unsplash.webp","thumbUrl":"https://cdn.prod.website-files.com/6b103c97c772e0b7fd40dd58/6b10400a3b95a25c8fe513c1_james-eades-RVX2STx44UI-unsplash.webp","_id":"6b10400a3b95a25c8fe513c1","updatedOn":"2026-12-02T15:58:04.434Z","fileSize":227854,"localizedSettings":{}},{"cdnUrl":"https://cdn.prod.website-files.com/6b103c97c772e0b7fd40dd58/6b10400a2da1b0678c7c0b0b_finding-dan-dan-grinwis-O35rT6OytRo-unsplash.webp","siteId":"6b103c97c772e0b7fd40dd58","width":800,"isHD":false,"height":1200,"fileName":"6b10400a2da1b0678c7c0b0b_finding-dan-dan-grinwis-O35rT6OytRo-unsplash.webp","createdOn":"2026-12-02T15:58:02.716Z","origFileName":"finding-dan-dan-grinwis-O35rT6OytRo-unsplash.webp","fileHash":"7567cb7cf5c3e730e4b964322ac0ae68","translationLoading":false,"variants":[{"s3Url":"https://s3.amazonaws.com/webflow-prod-assets/6b103c97c772e0b7fd40dd58/6b10400a2da1b0678c7c0b0b_finding-dan-dan-grinwis-O35rT6OytRo-unsplash-p-500.webp","origFileName":"finding-dan-dan-grinwis-O35rT6OytRo-unsplash-p-500.webp","fileName":"6b10400a2da1b0678c7c0b0b_finding-dan-dan-grinwis-O35rT6OytRo-unsplash-p-500.webp","format":"webp","width":500,"size":17898,"quality":100,"cdnUrl":"https://cdn.prod.website-files.com/6b103c97c772e0b7fd40dd58/6b10400a2da1b0678c7c0b0b_finding-dan-dan-grinwis-O35rT6OytRo-unsplash-p-500.webp","_id":"6b10400c9f8af343d412064a"}],"mimeType":"image/webp","isFromWellKnownFolder":false,"s3Url":"https://s3.amazonaws.com/webflow-prod-assets/6b103c97c772e0b7fd40dd58/6b10400a2da1b0678c7c0b0b_finding-dan-dan-grinwis-O35rT6OytRo-unsplash.webp","thumbUrl":"https://cdn.prod.website-files.com/6b103c97c772e0b7fd40dd58/6b10400a2da1b0678c7c0b0b_finding-dan-dan-grinwis-O35rT6OytRo-unsplash.webp","_id":"6b10400a2da1b0678c7c0b0b","updatedOn":"2026-12-02T15:58:04.170Z","fileSize":34552,"localizedSettings":{}},{"cdnUrl":"https://cdn.prod.website-files.com/6b103c97c772e0b7fd40dd58/6b10400a014214ac52e74b46_jonathan-borba-VRDDmrUx9o8-unsplash.webp","siteId":"6b103c97c772e0b7fd40dd58","width":800,"isHD":false,"height":1200,"fileName":"6b10400a014214ac52e74b46_jonathan-borba-VRDDmrUx9o8-unsplash.webp","createdOn":"2026-12-02T15:58:02.700Z","origFileName":"jonathan-borba-VRDDmrUx9o8-unsplash.webp","fileHash":"d419869c4dce991602fca1dc2aa256eb","translationLoading":false,"variants":[{"s3Url":"https://s3.amazonaws.com/webflow-prod-assets/6b103c97c772e0b7fd40dd58/6b10400a014214ac52e74b46_jonathan-borba-VRDDmrUx9o8-unsplash-p-500.webp","origFileName":"jonathan-borba-VRDDmrUx9o8-unsplash-p-500.webp","fileName":"6b10400a014214ac52e74b46_jonathan-borba-VRDDmrUx9o8-unsplash-p-500.webp","format":"webp","width":500,"size":23832,"quality":100,"cdnUrl":"https://cdn.prod.website-files.com/6b103c97c772e0b7fd40dd58/6b10400a014214ac52e74b46_jonathan-borba-VRDDmrUx9o8-unsplash-p-500.webp","_id":"6b10400c8a49ea74b1b8a525"}],"mimeType":"image/webp","isFromWellKnownFolder":false,"s3Url":"https://s3.amazonaws.com/webflow-prod-assets/6b103c97c772e0b7fd40dd58/6b10400a014214ac52e74b46_jonathan-borba-VRDDmrUx9o8-unsplash.webp","thumbUrl":"https://cdn.prod.website-files.com/6b103c97c772e0b7fd40dd58/6b10400a014214ac52e74b46_jonathan-borba-VRDDmrUx9o8-unsplash.webp","_id":"6b10400a014214ac52e74b46","updatedOn":"2026-12-02T15:58:04.010Z","fileSize":36116,"localizedSettings":{}}],"ix1":[],"ix2":{"interactions":[],"events":[],"actionLists":[]},"expandUserComponents":false},"meta":{"droppedLinks":0,"dynBindRemovedCount":0,"dynListBindRemovedCount":0,"paginationRemovedCount":0,"universalBindingsRemovedCount":0,"unlinkedSymbolCount":0,"codeComponentsRemovedCount":0,"richTextComponentsStripped":false,"sourceSiteId":"6b103c97c772e0b7fd40dd58"}}

Add custom JavaScript

JavaScript
(() => {
  'use strict';
  const itemSelector = '[data-perspective-item="true"]';
  document.querySelectorAll('[data-perspective-gallery="true"]').forEach((gallery) => {
    if (gallery.dataset.perspectiveInitialized) return;
    gallery.dataset.perspectiveInitialized = 'true';
    gallery.style.setProperty('--gallery-count', gallery.querySelectorAll(itemSelector).length);
    let activeItem = null;

    // Update the active card
    function setActive(item) {
      activeItem?.classList.remove('is-active');
      activeItem = item;
      activeItem?.classList.add('is-active');
    }

    // Touch and pen interaction
    gallery.addEventListener('pointerup', (event) => {
      if (event.pointerType === 'mouse') return;
      const item = event.target.closest(itemSelector);
      if (item && gallery.contains(item)) {
        setActive(activeItem === item ? null : item);
      }
    });

    // Reset on outside interaction
    document.addEventListener('pointerdown', (event) => {
      if (!gallery.contains(event.target) || !event.target.closest(itemSelector)) {
        setActive(null);
      }
    });

    // Reset when focus leaves the gallery
    gallery.addEventListener('focusout', (event) => {
      if (!gallery.contains(event.relatedTarget)) {
        setActive(null);
      }
    });
  });
})();

Add HTML structure

<div aria-label="Perspective gallery" data-perspective-gallery="true" role="group" class="p005-gallery">
  <div class="p005-gallery_scene">
    <div class="p005-gallery_list">
      <div tabindex="0" data-perspective-item="true" class="p005-gallery_item"><img src="assets/alessio-soggetti-x8GFIajIq6M-unsplash.webp" loading="lazy" sizes="100vw" srcset="assets/alessio-soggetti-x8GFIajIq6M-unsplash.webp 500w, assets/alessio-soggetti-x8GFIajIq6M-unsplash.webp 800w" alt="" class="p005-gallery_image" /></div>
      <div tabindex="0" data-perspective-item="true" class="p005-gallery_item"><img src="assets/wolfgang-hasselmann-Fd01B6nNPbo-unsplash.webp" loading="lazy" sizes="100vw" srcset="assets/wolfgang-hasselmann-Fd01B6nNPbo-unsplash.webp 500w, assets/wolfgang-hasselmann-Fd01B6nNPbo-unsplash.webp 800w" alt="" class="p005-gallery_image" /></div>
      <div tabindex="0" data-perspective-item="true" class="p005-gallery_item"><img src="assets/degleex-ganzorig-wQImoykAwGs-unsplash.webp" loading="lazy" sizes="100vw" srcset="assets/degleex-ganzorig-wQImoykAwGs-unsplash.webp 500w, assets/degleex-ganzorig-wQImoykAwGs-unsplash.webp 800w" alt="" class="p005-gallery_image" /></div>
      <div tabindex="0" data-perspective-item="true" class="p005-gallery_item"><img src="assets/james-eades-RVX2STx44UI-unsplash.webp" loading="lazy" sizes="100vw" srcset="assets/james-eades-RVX2STx44UI-unsplash.webp 500w, assets/james-eades-RVX2STx44UI-unsplash.webp 800w" alt="" class="p005-gallery_image" /></div>
      <div tabindex="0" data-perspective-item="true" class="p005-gallery_item"><img src="assets/finding-dan-dan-grinwis-O35rT6OytRo-unsplash.webp" loading="lazy" sizes="100vw" srcset="assets/finding-dan-dan-grinwis-O35rT6OytRo-unsplash.webp 500w, assets/finding-dan-dan-grinwis-O35rT6OytRo-unsplash.webp 800w" alt="" class="p005-gallery_image" /></div>
      <div tabindex="0" data-perspective-item="true" class="p005-gallery_item"><img src="assets/jonathan-borba-VRDDmrUx9o8-unsplash.webp" loading="lazy" sizes="100vw" srcset="assets/jonathan-borba-VRDDmrUx9o8-unsplash.webp 500w, assets/jonathan-borba-VRDDmrUx9o8-unsplash.webp 800w" alt="" class="p005-gallery_image" /></div>
    </div>
  </div>
</div>

Add custom CSS

/* Scoped Webflow base styles */
.p005-gallery,
.p005-gallery * {
  box-sizing: border-box;
}
.p005-gallery_image {
  max-width: 100%;
  vertical-align: middle;
  border: 0;
}

/* Designer layout and appearance */
.p005-gallery {
  background-color: #04111c;
  flex-flow: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 100svh;
  display: flex;
  position: relative;
  overflow: hidden;
}

.p005-gallery_scene {
  justify-content: center;
  align-items: center;
  width: 100%;
  display: flex;
  position: relative;
  overflow: visible;
}

.p005-gallery_list {
  justify-content: center;
  align-items: center;
  width: auto;
  display: flex;
  position: relative;
}

.p005-gallery_item {
  aspect-ratio: 2 / 3;
  flex: none;
  width: 18rem;
  position: relative;
  overflow: visible;
}

.p005-gallery_image {
  object-fit: cover;
  width: 100%;
  height: 100%;
  display: block;
}

@media screen and (max-width: 991px) {
  .p005-gallery_scene {
    padding: 6rem 0;
  }

  .p005-gallery_list {
    flex: none;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }

  .p005-gallery_item {
    width: 14rem;
  }
}

@media screen and (max-width: 767px) {
  .p005-gallery_list {
    justify-content: space-between;
    padding-top: 1rem;
    padding-bottom: 1rem;
    padding-right: 1rem;
  }

  .p005-gallery_item {
    width: 12rem;
  }
}

@media screen and (max-width: 479px) {
  .p005-gallery_item {
    width: 10rem;
  }
}

/* Original interaction styles */

/* Gallery settings */
.p005-gallery {
  --gallery-angle: 10deg;
  --gallery-overlap: -7rem;
}
/* Layout */
.p005-gallery_list {
  transform: rotateZ(var(--gallery-angle));
}
.p005-gallery_item {
  position: relative;
  z-index: 1;
  cursor: pointer;
}
.p005-gallery_item + .p005-gallery_item {
  margin-left: var(--gallery-overlap);
}
/* Image perspective */
.p005-gallery_image {
  --image-lift: 0rem;
  --image-depth: 0px;
  --image-rotation: -30deg;
  --image-skew: -16deg;
  transform: perspective(2000px) translateY(var(--image-lift)) translateZ(var(--image-depth))
    rotateZ(calc(-1 * var(--gallery-angle))) rotateY(var(--image-rotation)) skewY(var(--image-skew));
  transition:
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.4s ease;
  pointer-events: none;
}
/* Active and keyboard states */
.p005-gallery_item:is(.is-active, :focus-visible) {
  z-index: 2;
}
.p005-gallery_item:is(.is-active, :focus-visible) .p005-gallery_image {
  --image-lift: -2rem;
  --image-depth: 100px;
  --image-rotation: 0deg;
  --image-skew: 0deg;
}
.p005-gallery_list:has(.p005-gallery_item:is(.is-active, :focus-visible))
  .p005-gallery_item:not(.is-active, :focus-visible)
  .p005-gallery_image {
  filter: brightness(0.6);
}
/* Hover interaction */
@media (hover: hover) and (pointer: fine) {
  .p005-gallery_item:hover {
    z-index: 3;
  }
  .p005-gallery_item:hover .p005-gallery_image {
    --image-lift: -2rem;
    --image-depth: 100px;
    --image-rotation: 0deg;
    --image-skew: 0deg;
    filter: brightness(1);
  }
  .p005-gallery_list:has(.p005-gallery_item:hover)
    .p005-gallery_item:not(:hover)
    .p005-gallery_image {
    filter: brightness(0.6);
  }
}
/* Keyboard focus indicator */
.p005-gallery_item:focus-visible {
  outline: none;
}
.p005-gallery_item:focus-visible .p005-gallery_image {
  outline: 2px solid #fff;
  outline-offset: 4px;
}
/* Responsive scaling */
@media screen and (max-width: 991px) {
  .p005-gallery {
    --gallery-count: 6;
    --gallery-card-width: min(16rem, calc(88vw / (1 + (var(--gallery-count) - 1) * 0.5652)));
    --gallery-overlap: calc(var(--gallery-card-width) * -0.4348);
  }
  .p005-gallery_item {
    width: var(--gallery-card-width);
  }
}
/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .p005-gallery_image {
    transition: none;
  }
}

Add custom JavaScript

JavaScript
(() => {
  'use strict';
  const itemSelector = '[data-perspective-item="true"]';
  document.querySelectorAll('[data-perspective-gallery="true"]').forEach((gallery) => {
    if (gallery.dataset.perspectiveInitialized) return;
    gallery.dataset.perspectiveInitialized = 'true';
    gallery.style.setProperty('--gallery-count', gallery.querySelectorAll(itemSelector).length);
    let activeItem = null;

    // Update the active card
    function setActive(item) {
      activeItem?.classList.remove('is-active');
      activeItem = item;
      activeItem?.classList.add('is-active');
    }

    // Touch and pen interaction
    gallery.addEventListener('pointerup', (event) => {
      if (event.pointerType === 'mouse') return;
      const item = event.target.closest(itemSelector);
      if (item && gallery.contains(item)) {
        setActive(activeItem === item ? null : item);
      }
    });

    // Reset on outside interaction
    document.addEventListener('pointerdown', (event) => {
      if (!gallery.contains(event.target) || !event.target.closest(itemSelector)) {
        setActive(null);
      }
    });

    // Reset when focus leaves the gallery
    gallery.addEventListener('focusout', (event) => {
      if (!gallery.contains(event.relatedTarget)) {
        setActive(null);
      }
    });
  });
})();

Documentation

How to use in Webflow

‍

Copy the component into your Webflow project. Paste the JavaScript into "Page Settings → Before </body>" tag.

Publish your page to test the menu and replace the placeholder links with your own destinations.

‍

How it works

‍

The Mouse Image Trail displays a sequence of images as the cursor moves across the component. Each image appears at the cursor position, follows its movement with a subtle drift and rotation, and smoothly fades out. The effect is built with vanilla JavaScript and the native Web Animations API. Existing image elements are reused to keep the animation lightweight and performant, without external dependencies or continuous animation loops. The animation only responds to mouse input. Touch and pen input are ignored, and the effect is automatically disabled when the user has enabled reduced motion in their system settings.

‍

‍

Animation settings

‍

Adjust the following four values at the beginning of the JavaScript to customize the animation:

‍

‍

Images

‍

Replace, add, or remove images to create your own visual experience. The script automatically detects the number of images. Make sure each image retains the "data-trail-image=true" attribute.

For optimal performance, use compressed WebP images. Images are loaded eagerly to minimize delays during the animation, including on touch devices.

‍

‍

Styling

‍

Customize the image size, aspect ratio, border radius, typography, background color, and container height directly in the Webflow Designer or through the provided CSS. You can also adjust the stacking order to display the image trail in front of or behind the content. Keep the required data attributes and functional positioning styles intact to ensure the animation works correctly.

‍

‍

Multiple instances

‍

The component supports multiple independent instances on the same page. Simply duplicate the component while keeping its data attributes intact. The JavaScript only needs to be included once.

‍