BackButton
Goes up one level: from a table to the list of tables. It names the place it goes back to.
import { BackButton } from '@sypnia/ui/react'
Above a page title
Tables
orders
18,240 rows · 9 MB · 3 policies
Code
import { BackButton, PageHeader } from '@sypnia/ui/react';
// Above the title of a detail page, it names the place it goes back to.
export default function Header() {
return (
<div className="sy-stack">
<BackButton href="#tables">Tables</BackButton>
<PageHeader title="orders" lead="18,240 rows · 9 MB · 3 policies" />
</div>
);
} When to use it
Use it when
- Above the title of a detail page that is reached from a list.
- Say the place, «Tables», rather than «Back», when it is known.
Do not use it when
- Pages with a Breadcrumb that already says the way up.
- Going back in a multi-step task: use the Wizard's own buttons.
For everyone
- With
hrefit is a link, so it can be opened in a new tab. - The arrow is decoration; the words name the place.
Props
| BackButton | Type | Default |
|---|---|---|
href | string | |
onPress | (() => void) |