SwiftUI.js
Components

PresentationBackground

PresentationBackground adapts SwiftUI's `presentationBackground` modifier into an explicit surface wrapper.

PresentationBackground adapts SwiftUI's `presentationBackground` modifier into an explicit surface wrapper.

Examples

Automatic

Preview unavailable for this example in the static docs build.

Show code
<PresentationBackground>
      <Text style={{ padding: '16px 20px' }}>Default modal chrome</Text>
    </PresentationBackground>

Materials

Preview unavailable for this example in the static docs build.

Show code
<VStack spacing={12}>
      <PresentationBackground backgroundStyle="thinMaterial">
        <Text style={{ padding: '14px 18px' }}>Thin material panel</Text>
      </PresentationBackground>
      <PresentationBackground backgroundStyle="regularMaterial" shape="rounded">
        <Text style={{ padding: '16px 20px' }}>Regular material card</Text>
      </PresentationBackground>
      <PresentationBackground backgroundStyle="clear" shape="capsule">
        <Text style={{ padding: '12px 18px' }}>Clear chrome token</Text>
      </PresentationBackground>
    </VStack>

API

PropTypeRequiredDescription
backgroundStyle'automatic' | 'thinMaterial' | 'regularMaterial' | 'clear'NoNo description yet.
shape'automatic' | 'rounded' | 'capsule'NoNo description yet.

Inherits additional props from IBaseComponent.

Overview

PresentationBackground adapts SwiftUI's presentationBackground modifier into an explicit surface wrapper.

Status: adapted

On this page