Skip to main content

useHorizontalNav

Overview

The useHorizontalNav() hook is a custom hook specifically designed to handle the functionality of a navigation menu within a web application. Its purpose is to provide a comprehensive variable that can be utilized to customize the behavior of the navigation menu. This documentation has explained how to use the hook and described variables for configuring and customizing the navigation menu.

Values

The useHorizontalNav() hook provides the following variable that can be used to customize the behavior of the navigation menu:

ValueTypeDescription
isBreakpointReachedbooleanA boolean value that indicates whether the breakpoint has been reached.
updateIsBreakpointReached(isBreakpointReached: boolean) => voidA function used to update isBreakpointReached value.

Usage

To utilize the useHorizontalNav() hook, please refer to the example provided below:

isBreakpointReached

/use-horizontal-nav/is-breakpoint-reached

Source Code


updateIsBreakpointReached

/use-horizontal-nav/updated-is-breakpoint-reached

Example screen size is larger than 800px

Source Code