Astro components BackButton
// BackButton

BackButton

Astro wrapper for back navigation, as a GlassPanel card tile or a muted inline ghost link.

BackButton is a back-navigation link in two shapes. variant="card" (the default) renders a GlassPanel tile with an arrow, a label and an optional subtitle, class talos-backbtn talos-backbtn--card. variant="ghost" renders a muted inline text link, class talos-backbtn talos-backbtn--ghost. The arrow falls back to a text glyph (↖ on the card, ← on the ghost); pass an icon through the arrow slot to replace it.

Card

PREVIEW
Back to docsGetting started

Ghost

PREVIEW
---
import BackButton from "@j_shelfwood/talos-ui/astro/BackButton.astro";
---
<BackButton href="/docs/" text="Back to docs" subtitle="Getting started" />

<BackButton variant="ghost" href="/blog" text="Back to blog">
  <Icon slot="arrow" name="lucide:arrow-left" />
</BackButton>

The default slot overrides text as the label.

Props

PropTypeDefaultMeaning
hrefstringrequiredlink target
textstring"Back"label; the default slot replaces it
subtitlestringnonesecond line, card variant only
variant"card" | "ghost""card"the GlassPanel tile or the inline text link
classstringnoneextra classes on the link
...restHTMLAttributes<"a">noneforwarded to the <a>

Requires @j_shelfwood/talos-ui/talos.css; the card variant also uses the talos-pad inset from talos-layout.css.