Skip to main content
196

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Apple docs
Data displayApple

Media viewport

Inspect media with controlled bounded zoom, pan and fit.

Public APILumenMediaViewportApple / SwiftUISwift product: LumenUI

Apple availability

Supported native targets

Import LumenUI in the target that uses this component. iPad support follows the iOS package baseline and uses native iPad layout behavior.

iPhone · iOS 16+iPad · iPadOS 16+Mac · macOS 13+Apple Vision · visionOS 1+

Native example

Use Media viewport

Applications own media loading, edits, selection, persistence and task lifetimes. Compose localized LumenButton move actions beside thumbnails. See the Studio media workspace guide for exact adapter contracts and supported Apple form factors.

Media viewport rendered in the iPhone simulator Lumen playground
Captured exampleiPhone simulator
swift
LumenMediaViewport("Inspect photo", value: $viewport) { Image("photo").resizable().scaledToFill() }

Reference

Public API

The primary shared and platform-specific options exposed by LumenMediaViewport.

APIValues or typeDefaultDescription
label / contentString / native contentRequiredNames the media surface and provides application-owned content.

Native behavior

Design and accessibility

When to use it

Applications own media loading, edits, selection, persistence and task lifetimes. Compose localized LumenButton move actions beside thumbnails. See the Studio media workspace guide for exact adapter contracts and supported Apple form factors.

Accessibility

Localized zoom and visible actions complement native gestures.

Shared component

Available on other platforms

React NativeAndroid / Compose
Apple docsSwiftUI package