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!
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.
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 for Focus Navigation is available on the official documentation website.
Licensed under the MIT License — see LICENSE.txt.
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.