Skip to content
Dave Klein
Writing

Introducing DKMediaViewer

Presenting a grid of photos and launching a modal after clicking a photo seems straightforward considering how many decades the capability has existed in the browser, but there are many performance and design decisions to ensure the experience feels perfect. DKMediaViewer (the DK prefix is of course an homage to NeXTSTEP’s NS prefixes) is my Photos page and modal packaged up for anyone to use. Click a photo and it flies into place. Tap an arrow key and the next one glides in.

Read more about how it works, check out the source on GitHub, or download it on npm. If you want to present a photo collection, I would love for it to feel this good.

Chat about this?

Send a comment
Writing