Components

PresentationCompactAdaptation

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

Example

Requires React 18.2+ or 19 and shared styles. See setup.

Automatic

Loading preview…

Code
'use client';
import { Text } from '@swiftuijs/ui';
import { PresentationCompactAdaptation } from '@swiftuijs/ui';
export default function Example() {
    return ((<PresentationCompactAdaptation>
      <Text>Adaptive presentation fallback</Text>
    </PresentationCompactAdaptation>));
}

Status: adapted

Usage and limitations

  • Sets classes and data-presentation-compact-adaptation only. It does not automatically turn a popover into a sheet/full-screen presentation on compact screens; choose the presentation in application code.

More examples

Variants

API reference

PropTypeRequiredDescription
adaptation'automatic' | 'none' | 'popover' | 'sheet' | 'fullScreenCover'No—

Inherits additional props from IBaseComponent.