
Security News
Deno 2.6 + Socket: Supply Chain Defense In Your CLI
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.
@fluentui-contrib/react-gamepad-navigation
Advanced tools
**Gamepad Navigation for [Fluent UI React](https://react.fluentui.dev/)**
Gamepad Navigation for Fluent UI React
[!WARNING] These are not production-ready components and should never be used in product. This space is useful for testing new components whose APIs might change before final release.
This package provides gamepad navigation support for Fluent UI Components. Any gaming controller implementing the Gamepad API is supported. Major brand controllers such as Xbox, PlayStation, Nintendo, 8bit, etc. are supported.
This hook calls useArrowNavigationGroup and useFocusableGroup internally. For that reason, 'useGamepadNavigationGroup' hook uses the same API and configuration as those two previous hooks.
In addition to gamepad navigation, arrow key navigation is available by calling this hook, so there is no need to call useArrowNavigationGroup separately.
yarn add @fluentui-contrib/react-gamepad-navigation
| Controller Input | Mapped Behavior |
|---|---|
| 'A' Button | 'Enter' keydown behavior |
| 'B' Button | 'Escape' keydown behavior |
| 'X' Button | Not supported |
| 'Y' Button | Not supported |
| Bumpers | Not supported |
| Dpad | Arrow navigation (up/down/left/right) |
| Left Stick | Arrow navigation (up/down/left/right) |
| Right Stick | Not supported |
| Triggers | Not supported |
| Component | Support |
|---|---|
| Button | âś… Supported |
| Checkbox | âś… Supported |
| Combobox | âś… Supported |
| Dropdown | âś… Supported |
| Input | âś… Supported |
| Link | âś… Supported |
| Menu | âś… Supported |
| RadioGroup | ⚠️ Partial Support |
| Select | â›” Not Supported |
| Slider | â›” Not Supported |
| SpinButton | â›” Not Supported |
| Switch | âś… Supported |
| Textarea | âś… Supported |
[!NOTE] There will be no support for select native element, you should use Dropdown or Combobox components instead.
| Component | Support |
|---|---|
| Accordion | âś… Supported |
| Breadcrumb | âś… Supported |
| DataGrid | âś… Supported |
| InteractionTag | âś… Supported |
| SwatchPicker | âś… Supported |
| TabList | âś… Supported |
| TagPicker | ⚠️ Partial Support |
| TeachingPopover | ? |
| Toolbar | ? |
| Tree | ? |
import { useGamepadNavigationGroup } from '@fluentui-contrib/react-gamepad-navigation';
export const SampleApp = () => {
// attributes for both: Gamepad and Arrow key navigation
const { gamepadNavDOMAttributes } = useGamepadNavigationGroup();
return <div {...gamepadNavDOMAttributes}></div>;
};
The default configuration provides the closest behavior to a console navigation experience. However, All the configurations from useArrowNavigationGroup and useFocusableGroup hooks are available as part of the options for useGamepadNavigationGroup
axistype axis: 'vertical' | 'horizontal' | 'grid' | 'grid-linear' | 'both';
Default: grid
Focus will navigate vertically, horizontally or in both directions (grid).
circulartype circular: boolean;
Default: false
Focus will cycle to the first/last elements of the group without stopping.
focusFirstElementtype focusFirstElement: boolean;
Default: false
First focusable element in the group will be focused when the group is focused for the first time.
memorizeCurrenttype memorizeCurrent: boolean;
Default: false
Last focused element in the group will be remembered and focused (if still available) when tabbing from outside of the group.
tabbabletype tabbable: boolean;
Default: true
Allow tabbing within the arrow navigation group items.
tabBehaviortype tabBehavior: 'unlimited' | 'limited' | 'limited-trap-focus';
Default: limited-trap-focus
Behavior for the Tab key.
ignoreDefaultKeydowntype ignoreDefaultKeydown: TabsterTypes.FocusableProps['ignoreKeydown'];
Default: {}
Tabster can ignore default handling of keydown events.
FAQs
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.