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-adaptationonly. 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
| Prop | Type | Required | Description |
|---|---|---|---|
adaptation | 'automatic' | 'none' | 'popover' | 'sheet' | 'fullScreenCover' | No | — |
Inherits additional props from IBaseComponent.