Components
PresentationBackground
PresentationBackground adapts SwiftUI's presentationBackground modifier into an explicit surface 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 { PresentationBackground } from '@swiftuijs/ui';
export default function Example() {
return ((<PresentationBackground>
<Text style={{ padding: '16px 20px' }}>Default modal chrome</Text>
</PresentationBackground>));
}Status: adapted
More examples
Materials
API reference
| Prop | Type | Required | Description |
|---|---|---|---|
backgroundStyle | 'automatic' | 'thinMaterial' | 'regularMaterial' | 'clear' | No | — |
shape | 'automatic' | 'rounded' | 'capsule' | No | — |
Inherits additional props from IBaseComponent.
Popover
Popover presents lightweight content anchored to another control. It aligns with SwiftUI's `popover` presentation while keeping web-friendly dialog semantics.
PresentationCompactAdaptation
PresentationCompactAdaptation adapts SwiftUI's `presentationCompactAdaptation` modifier into an explicit wrapper.