BackButton
Click to navigate to previous page
import BackButton from "@intility/bifrost-react/BackButton";BackButton
Go to top
Default behavior
BackButton should be placed directly above the page title, and in the same area on every page.
By default, it will trigger history.back() and display english 'Back' text.
See breadcrumbs for more flexibility and multiple levels.
Custom text
Bifrost ships with English, Norwegian, and Swedish locale, which you can toggle through the <Bifrost> component, or you can set a custom text directly:
Routing library
If you are using a routing library, you can use its method of manipulating history
instead of the native browser window.history.back(), by overriding onClick.
TSX
<BackButton
onClick={() => {
// do something (instead of `history.back()`)
}}
/>