Skip to content

Playground

The dsui image gallery shows several pictures as one bundle and opens them larger on click. You can switch between three layouts yourself: fan, grid, and strip.

Published

The dsui image gallery is a component that shows several pictures as one bundle. A click opens them larger on a dimmed background, and the layout is one of three.

grid tiles up to four pictures and counts the rest on the last tile as +N. strip is a row that scrolls sideways. fan spreads overlapping tilted cards, and pointing at one pushes its neighbours away. Cards that do not fit sit behind +N.

A click opens the pictures larger on a dimmed background, and you page with the arrow buttons, the left and right arrow keys, or a swipe. Each picture shows its caption and source. Esc, the close button, or a click outside closes it, and focus goes back to the tile. With a mouse over the dimmed area, the cursor turns into a round close button.

데이터 표
gridUp to four tiles+N on the last tile
stripA row that scrolls sidewaysThey continue in the row
fanOverlapping tilted cardsThey sit behind +N

Source: the dsui image gallery component notes

Change the layout in the control panel, and click a picture to open it larger.

image-gallery live demoOpen in the library

With several pictures, the first question is how many to show at a glance. A fan suits the middle of a post, and a grid suits places where comparison matters.

코멘트