Back link
Takes you one level up to the list you came from, the same way on every page.
Examples
All events
Autumn reading night
Thu, Oct 23, 7:00 PM
All events at the Northgate library
Autumn reading night
Thu, Oct 23, 7:00 PM
18 going, 4 on the waitlist.
Usage
Use it when
- A page sits one level under a list, such as an event under "All events", and you need the way back above the title.
- The way back must look the same on every page of the app.
Use something else when
- The path is deeper than one level and every ancestor must show. Use Nav for the sections and a plain row of text links for the ancestors, the Breadcrumb row of coverage-gaps, instead.
- The link moves between sections of the app. Use Nav instead.
- The link sits in running text. Use TextLink instead.
- The control runs an action and goes nowhere, such as closing a sheet. Use Button instead.
Rules
General
Content
Avoid
Limits
Install
npx shadcn@latest add https://kaanarici.com/r/cobalt/back-link.jsonimport { BackLink } from "@/components/cobalt/ui/back-link"