npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@fluentui-contrib/react-gamepad-navigation

v0.2.2

Published

**Gamepad Navigation for [Fluent UI React](https://react.fluentui.dev/)**

Downloads

117

Readme

@fluentui-contrib/react-gamepad-navigation

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.

Installation

yarn add @fluentui-contrib/react-gamepad-navigation

Mappings

| 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 |

Components Support

Single Elements

| 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.

Composed Elements

| Component | Support | | --------------- | ------------------ | | Accordion | ✅ Supported | | Breadcrumb | ✅ Supported | | DataGrid | ✅ Supported | | InteractionTag | ✅ Supported | | SwatchPicker | ✅ Supported | | TabList | ✅ Supported | | TagPicker | ⚠️ Partial Support | | TeachingPopover | ? | | Toolbar | ? | | Tree | ? |

Usage

To import Hook:

import { useGamepadNavigationGroup } from '@fluentui-contrib/react-gamepad-navigation';

Examples

export const SampleApp = () => {
  // attributes for both: Gamepad and Arrow key navigation
  const { gamepadNavDOMAttributes } = useGamepadNavigationGroup();

  return <div {...gamepadNavDOMAttributes}></div>;
};

Options

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

Hook Options

axis

type axis: 'vertical' | 'horizontal' | 'grid' | 'grid-linear' | 'both';

Default: grid

Focus will navigate vertically, horizontally or in both directions (grid).

circular

type circular: boolean;

Default: false

Focus will cycle to the first/last elements of the group without stopping.

focusFirstElement

type focusFirstElement: boolean;

Default: false

First focusable element in the group will be focused when the group is focused for the first time.

memorizeCurrent

type 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.

tabbable

type tabbable: boolean;

Default: true

Allow tabbing within the arrow navigation group items.

tabBehavior

type tabBehavior: 'unlimited' | 'limited' | 'limited-trap-focus';

Default: limited-trap-focus

Behavior for the Tab key.

ignoreDefaultKeydown

type ignoreDefaultKeydown: TabsterTypes.FocusableProps['ignoreKeydown'];

Default: {}

Tabster can ignore default handling of keydown events.