NavigatorButton Edit

This feature is still experimental. “Experimental” means this is an early implementation subject to drastic and breaking changes.

The NavigatorButton component can be used to navigate to a screen and should be used in combination with the NavigatorProvider, the NavigatorScreen and the NavigatorBackButton components (or the useNavigator hook).

Usage

Refer to the NavigatorProvider component for a usage example.

Top ↑

Props

The component accepts the following props:

Top ↑

attributeName: string

The HTML attribute used to identify the NavigatorButton, which is used by Navigator to restore focus.

  • Required: No
  • Default: id

Top ↑

onClick: React.MouseEventHandler< HTMLElement >

The callback called in response to a click event.

  • Required: No

Top ↑

path: string

The path of the screen to navigate to. The value of this prop needs to be a valid value for an HTML attribute.

  • Required: Yes

Top ↑

Inherited props

NavigatorButton also inherits all of the Button props, except for href.