SwiftUI.js
Components

PresentationCompactAdaptation

PresentationCompactAdaptation adapts SwiftUI's `presentationCompactAdaptation` modifier into an explicit wrapper.

PresentationCompactAdaptation adapts SwiftUI's `presentationCompactAdaptation` modifier into an explicit wrapper.

Examples

Automatic

Preview unavailable for this example in the static docs build.

Show code
<PresentationCompactAdaptation>
      <Text>Adaptive presentation fallback</Text>
    </PresentationCompactAdaptation>

Variants

Preview unavailable for this example in the static docs build.

Show code
<VStack spacing={12}>
      <PresentationCompactAdaptation adaptation="popover">
        <Text>Prefer popover in compact size</Text>
      </PresentationCompactAdaptation>
      <PresentationCompactAdaptation adaptation="sheet">
        <Text>Prefer sheet in compact size</Text>
      </PresentationCompactAdaptation>
      <PresentationCompactAdaptation adaptation="fullScreenCover">
        <Text>Escalate to full-screen cover</Text>
      </PresentationCompactAdaptation>
    </VStack>

API

PropTypeRequiredDescription
adaptation'automatic' | 'none' | 'popover' | 'sheet' | 'fullScreenCover'NoNo description yet.

Inherits additional props from IBaseComponent.

Overview

PresentationCompactAdaptation adapts SwiftUI's presentationCompactAdaptation modifier into an explicit wrapper.

Status: adapted

On this page