Footer: compact brand and links
A compact footer with a brand, tagline, copyright and one row of links.
pnpm dlx shadcn@latest add @haze/footer-compact---
import { cn } from "../../../lib/haze/utils";
import LogoMark from "../ui/logo-mark.astro";
interface Props {
brand?: string;
homeHref?: string;
tagline?: string;
links?: { label: string; href: string }[];
copyright?: string;
class?: string;
}
const {
brand = "Driftwork",
homeHref = "/",
tagline = "Make room for thoughtful work.",
links = [{ label: "About", href: "#about" }, { label: "Contact", href: "#contact" }, { label: "Privacy", href: "#privacy" }],
copyright = "© 2026 Driftwork. All rights reserved.",
class: className,
} = Astro.props;
---
<footer class={cn("border-t border-border bg-muted/40 px-6 py-12", className)}>
<div class="mx-auto flex max-w-6xl flex-col items-start gap-8 sm:flex-row sm:items-end sm:justify-between">
<div>
<a href={homeHref} aria-label={`${brand} home`} class="inline-flex rounded-md focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-ring"><LogoMark name={brand} shape="diamond" class="text-foreground" /></a>
<p class="mt-3 text-sm/6 text-muted-foreground">{tagline}</p>
<p class="mt-6 text-[0.8125rem]/5 text-muted-foreground">{copyright}</p>
</div>
<nav aria-label="Footer">
<ul class="flex flex-wrap gap-x-6 gap-y-2">
{links.map((link) => <li><a href={link.href} class="inline-flex min-h-9 items-center rounded-sm text-sm/5 text-muted-foreground transition-colors duration-150 ease-snappy hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-ring">{link.label}</a></li>)}
</ul>
</nav>
</div>
</footer>When to use
- A small site needs a short set of footer destinations
- A full multi-column sitemap would be excessive
When not to use
- The footer needs several groups of links; use footer-columns
Installation
Add the Haze registry to components.json once, then install Footer: compact brand and links with the shadcn CLI. Works in any Astro project with Tailwind CSS v4.
pnpm dlx shadcn@latest add @haze/footer-compactnpx shadcn@latest add @haze/footer-compactyarn dlx shadcn@latest add @haze/footer-compactbunx --bun shadcn@latest add @haze/footer-compactFirst time? Registry and theme setup
1. Add to components.json:
{
"registries": {
"@haze": "http://localhost:4329/r/{name}.json"
}
}2. Install the theme once: npx shadcn@latest add @haze/theme, then import it after Tailwind in your global CSS:@import "./haze.css";
API reference
| Prop | Type | Default | Description |
|---|---|---|---|
| brand | string | "Driftwork" | Brand name in the logo and home link. |
| homeHref | string | "/" | Home destination for the brand. |
| tagline | string | demo copy | Short line beneath the brand. |
| links | { label: string; href: string }[] | 3 example anchors | Footer destinations; replace example anchors with real URLs. |
| copyright | string | fictional copyright line | Copyright or other legal line. |
| class | string | – | Additional footer classes. |
Keyboard interactions
- Tab, Enter
- Visit the home link and footer destinations.
Accessibility
- The footer links are grouped in a named navigation landmark.
- The brand home link has an accessible name that identifies its destination.
Notes for AI
Copy into Claude Code, Cursor, Codex or any coding agent. Agents can also read the Markdown version of this page.
Install and use
Install the Haze UI block "Footer: compact brand and links" with `npx shadcn@latest add @haze/footer-compact`. If components.json has no "@haze" registry yet, add "registries": { "@haze": "http://localhost:4329/r/{name}.json" }. If src/styles/haze.css does not exist yet, run `npx shadcn@latest add @haze/theme` once and import it from the global stylesheet after Tailwind. The CLI stops at an overwrite question when a Haze file already exists and differs, even with --yes, and then installs nothing after it: read its output. If the user has not edited their Haze files, re-run with --overwrite to take the registry versions; if they have, ask them before overwriting. Then import FooterCompact from "@/components/haze/blocks/footer-compact.astro" (or the relative path) and render it where it fits the page. Keep Haze token classes (bg-background, text-muted-foreground, border-border...) and never hardcode colors. Docs: http://localhost:4329/blocks/footer-compact.md
Customize with real content
Adapt the Haze footer-compact block for our product. Replace the demo values of these props with our real content: brand, homeHref, tagline, links, copyright, class. Keep the layout, the heading level rules and these accessibility details: The footer links are grouped in a named navigation landmark. The brand home link has an accessible name that identifies its destination. Do not add raw color classes; use the Haze tokens.
Choose the right block
Before using footer-compact, check it fits: use it when a small site needs a short set of footer destinations; a full multi-column sitemap would be excessive. Avoid it when the footer needs several groups of links; use footer-columns. Alternatives: @haze/footer-columns.
Dependencies
- @haze/logo-mark
- @haze/utils
- @haze/theme (one-time setup)
Source · Original Haze UI work.