Repository navigation
v0.99.0
Added
-
ImageViewer — a picture that opens out of the page to the middle of the screen over a
blur, for photos in a feed, a gallery grid or a post. Wrap each image in an
ImageViewer.Trigger, or wrap content that already draws it, such asPost.Media.- Every trigger under one root is a page of the same gallery. Swipe sideways between them,
and the thumbnail hidden underneath follows the page. - Pinch or double-tap to zoom. Drag the picture up or down, tap outside it, use the close
button or press Android's back button to send it back into its thumbnail. captionshows under the open picture.fullSourceloads a larger copy once the viewer
opens, so the page can carry small thumbnails.insetandcornerRadiusset the open picture's margin and corners, 16 points each by
default. Pass0for both to fill the screen.open,indexand theironOpenChange/onIndexChangecallbacks make it controlled.
The picture moves from the thumbnail's own rectangle and corner radius to the whole image,
so the crop opens out rather than a second copy fading in. Passradiuson a trigger to
match itsrounded-*class, because a class cannot be read back. The blur needs the
optionalexpo-blurand falls back to a dim without it. - Every trigger under one root is a page of the same gallery. Swipe sideways between them,
-
Scrim —
progress, a shared value from0to1that drives the backdrop instead of
its own fade. The blur's radius tracks it, so an overlay dragged partway out can bring the
page back into focus as it goes.
Docs
- Post — a "Photos that open" version and example: a single photo, a grid of four that is
one gallery, and a media-first card, each opening in anImageViewer. - Home page — the heading and introduction above the component showcase are centred.