Components
AllowsHitTesting
AllowsHitTesting adapts SwiftUI's allowsHitTesting(_:) modifier into an explicit interaction wrapper for web overlays and disabled hit regions.
Example
Requires React 18.2+ or 19 and shared styles. See setup.
Enabled
Loading preview…
Code
'use client';
import { AllowsHitTesting, Button } from '@swiftuijs/ui';
export default function Example() {
return ((<AllowsHitTesting>
<Button>Primary action</Button>
</AllowsHitTesting>));
}Status: adapted
More examples
Disabled Overlay
API reference
| Prop | Type | Required | Description |
|---|---|---|---|
enabled | boolean | No | — |
Inherits additional props from IBaseComponent.