Components
Back link
Use the back link component to help users go back to the previous page in a multi-page transaction.
Read the Design System guidance for back link
Import
import { BackLink } from 'govuk-react/back-link';Examples
Default
Code
<BackLink onClick={action('go-back')} />With href
Code
<BackLink
onClick={action('go-back')}
href="#"
>
Back
</BackLink>With react router
Code
<BrowserRouter>
<BackLink asChild {...args}>
<RouterLink to="/">Back</RouterLink>
</BackLink>
</BrowserRouter>API reference
BackLink
Use the back link component to help users go back to the previous page in a multi-page transaction.
| Prop | Type |
|---|---|
inverseUse on dark backgrounds. | boolean |
asChildRender the only child (such as a router's link) instead of an | boolean |