Cross-platform input, device detection, and haptics for Strata 3D games
npm install @strata-game-library/capacitor-plugin

Cross-platform input, device detection, and haptics for Strata 3D games. Works with Capacitor for iOS/Android native apps, Electron for desktop, and pure web.
Full documentation is available at strata.game/mobile/capacitor
---
Strata is the Games & Procedural division of the jbcom enterprise. This plugin is part of a coherent suite of specialized tools, sharing a unified design system and interconnected with sibling organizations like Agentic and Extended Data.
- Device Detection - Platform, device type, input mode detection
- Unified Input - Touch, keyboard, and gamepad abstraction
- Haptic Feedback - Device vibration and gamepad rumble
- Screen Orientation - Lock/unlock orientation
- Safe Area Insets - Accurate safe area for notched screens
- React Hooks - Ready-to-use hooks for React/R3F integration
``bash`
pnpm install @strata/capacitor-plugin
npx cap sync
`tsx
import { DeviceProvider, useDevice, useInput, useHaptics } from '@strata/capacitor-plugin/react';
function App() {
return (
);
}
function Game() {
const device = useDevice();
const { leftStick } = useInput();
const { medium } = useHaptics();
return
}
``
| Feature | Web | iOS | Android | Electron |
|---------|-----|-----|---------|----------|
| Device Detection | ✅ | ✅ | ✅ | ✅ |
| Touch Input | ✅ | ✅ | ✅ | ✅ |
| Keyboard Input | ✅ | ⚠️ | ⚠️ | ✅ |
| Gamepad Input | ✅ | ⚠️ | ⚠️ | ✅ |
| Device Haptics | ⚠️ | ✅ | ✅ | ❌ |
| Gamepad Haptics | ✅ | ❌ | ❌ | ✅ |
- Strata Documentation - Full documentation
- Strata Core - Main library
- React Native Plugin - React Native version
MIT © Jon Bogaty