API REFERENCE · NAVIGATION
<dj-forward-button>
A Forward button that follows the app's navigation history.
It is built on <dj-button>, so keyboard use, focus, and button semantics come from there. Install @dojo-ng/history once at startup; the button finds it through HistoryController.
- It calls Forward, and is disabled when there is nothing to go forward to: before any Back, and after a new navigation, which clears Forward. With no history installed it calls
window.history.forward()and is never disabled. - After a reload with
sessionStorageblocked, history cannot know how far Forward goes, so the button stays disabled. That is harmless. dj-forwardfires first and can be canceled. CallpreventDefault()to do something else.- The label is "Forward". Set
labelto replace it. The accessible name always equals the visible label. Withicon-only, only the arrow shows, the label becomes the accessible name, and a tooltip shows it on hover and focus. The arrow mirrors in right-to-left layouts.
npm install @dojo-ng/nav-history
import "@dojo-ng/nav-history";
Properties
| Property | Attribute | Type | Default |
|---|---|---|---|
labelReplaces the default label. |
label |
string |
None |
iconOnlyShow only the arrow. The label is still the accessible name, and a tooltip shows it. |
icon-only reflected |
boolean |
false |
Events
| Event | Description |
|---|---|
dj-forward | cancelable, empty detail |
CSS parts
Style these with dj-forward-button::part(name).
| Part | Description |
|---|---|
button | the composed <dj-button> |
Methods
focus(options: FocusOptions)blur()