Skip to content

Focus handling and navigation library with React integration. This is a read-only mirror.

License

Notifications You must be signed in to change notification settings

Roblox/focus-navigation

Repository files navigation

Focus Navigation

 

Overview

Focus Navigation is a collection of libraries used to build UI that can be navigated using directional input, like a gamepad or keyboard, in a more feature-rich way. The word "focus" in this library can be thought of as an expansion upon the existing concept of "selection".

Some common uses include:

  • Easier keybinds and callback mappings
  • Custom behavior for containers when selection enters their UI tree
  • Managing logic for the currently selected object
  • Detecting what input method the user is utilizing

...and more!

General Use

The primary public interface for this library is through React via ReactFocusNavigation, but non-React helpers are also provided in FocusNavigation. Most features built using this library will use one of these options combined with InputHandlers to manage keybinds and callbacks.

Installation

The Focus Navigation library can be installed via Rotriever. Add the following to the rotriever.toml file for your project:

ReactFocusNavigation = "github.com/roblox/focus-navigation-internal@1.3.0"

Optionally, you may wish to include the InputHandlers utility library as well:

InputHandlers = "github.com/roblox/focus-navigation-internal@1.3.0"

Documentation

Documentation for Focus Navigation is available on the official documentation website.

License

Licensed under the MIT License — see LICENSE.txt.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the MIT license, shall be licensed as above, without any additional terms or conditions.

Take a look at the contributing guide for guidelines on how to contribute to Focus Navigation.

About

Focus handling and navigation library with React integration. This is a read-only mirror.

Resources

License

Stars

Watchers

Forks