↗
↗
↗
↗
☰
SpatialNavigationDeviceTypeProvider
iOS
Android
Web
TV
Detects whether the user is interacting with pointer, keyboard, touch, or remote input so spatial navigation can adapt focus behavior.
Import
tsx
Copy
import
{
SpatialNavigationDeviceTypeProvider
}
from
'react-native-cross-elements'
;
Preview
Preview
Code
device-type-provider.tsx
Input mode aware navigation
Wrap it above SpatialNavigationRoot.
Usage
tsx
Copy
import
{
SpatialNavigationDeviceTypeProvider
,
SpatialNavigationRoot
,
}
from
'react-native-cross-elements'
;
export
default
function
App
(
)
{
return
(
<
SpatialNavigationDeviceTypeProvider
>
<
SpatialNavigationRoot
>
<
AppRoutes
/
>
<
/
SpatialNavigationRoot
>
<
/
SpatialNavigationDeviceTypeProvider
>
)
;
}
Tip
ℹ️
Use this provider once near the root of apps that support both pointer and remote style navigation.