Skip to content

Portfolio hero

Name, practice, location and availability — with availability as a Status, not a badge.

Headersstarterheroportfoliopersonalavailability

Live preview

full widthLive preview — open it in a new tab for the full-height version.
Open the preview in a new tab

Source

This exact file renders the preview above.

import Link from 'next/link'
import { ArrowUpRight, MapPin } from 'lucide-react'
import { Container } from '@/components/ui/layout'
import { Status } from '@/components/ui/status'

/**
 * Portfolio header
 *
 * A person, not a product: name, what they do, where they are, and whether
 * they are available. Availability is a Status rather than a badge, so it
 * carries an icon and a word — the one piece of information a visitor is
 * actually here to check.
 */
const links = [
  { label: 'Selected work', href: '/starters/portfolio/preview/projects' },
  { label: 'Writing', href: '/starters/portfolio/preview/writing' },
  { label: 'Contact', href: '/starters/portfolio/preview/contact' },
]

export default function PortfolioHeader() {
  return (
    <header className="border-b border-line bg-canvas py-section">
      <Container size="narrow">
        <div className="flex flex-wrap items-center gap-x-4 gap-y-2">
          <h1 className="display-type text-3xl font-semibold text-ink-strong sm:text-4xl">
            Amara Osei
          </h1>
          <Status appearance="pill" kind="operational" label="Available from June" />
        </div>

        <p className="mt-5 max-w-xl text-md leading-relaxed text-ink-muted sm:text-lg">
          Frontend architect working on design systems, accessibility and the parts of performance
          that turn out to be architecture problems.
        </p>

        <div className="mt-6 flex items-center gap-1.5 text-sm text-ink-subtle">
          <MapPin className="size-4" aria-hidden="true" />
          Accra, Ghana — remote across GMT ± 3
        </div>

        <nav aria-label="Portfolio sections" className="mt-8 border-t border-line pt-6">
          <ul className="flex flex-wrap gap-x-6 gap-y-2">
            {links.map((link) => (
              <li key={link.href}>
                <Link
                  href={link.href}
                  className="inline-flex items-center gap-1.5 text-sm font-medium text-ink underline underline-offset-4 hover:text-accent"
                >
                  {link.label}
                  <ArrowUpRight className="size-3.5" aria-hidden="true" />
                </Link>
              </li>
            ))}
          </ul>
        </nav>
      </Container>
    </header>
  )
}

components/blocks/headers/portfolio.tsx

import Link from 'next/link'
import { ArrowUpRight, MapPin } from 'lucide-react'
import { Container } from '@/components/ui/layout'
import { Status } from '@/components/ui/status'

/**
 * Portfolio header
 *
 * A person, not a product: name, what they do, where they are, and whether
 * they are available. Availability is a Status rather than a badge, so it
 * carries an icon and a word — the one piece of information a visitor is
 * actually here to check.
 */
const links = [
  { label: 'Selected work', href: '/starters/portfolio/preview/projects' },
  { label: 'Writing', href: '/starters/portfolio/preview/writing' },
  { label: 'Contact', href: '/starters/portfolio/preview/contact' },
]

export default function PortfolioHeader() {
  return (
    <header className="border-b border-line bg-canvas py-section">
      <Container size="narrow">
        <div className="flex flex-wrap items-center gap-x-4 gap-y-2">
          <h1 className="display-type text-3xl font-semibold text-ink-strong sm:text-4xl">
            Amara Osei
          </h1>
          <Status appearance="pill" kind="operational" label="Available from June" />
        </div>

        <p className="mt-5 max-w-xl text-md leading-relaxed text-ink-muted sm:text-lg">
          Frontend architect working on design systems, accessibility and the parts of performance
          that turn out to be architecture problems.
        </p>

        <div className="mt-6 flex items-center gap-1.5 text-sm text-ink-subtle">
          <MapPin className="size-4" aria-hidden="true" />
          Accra, Ghana — remote across GMT ± 3
        </div>

        <nav aria-label="Portfolio sections" className="mt-8 border-t border-line pt-6">
          <ul className="flex flex-wrap gap-x-6 gap-y-2">
            {links.map((link) => (
              <li key={link.href}>
                <Link
                  href={link.href}
                  className="inline-flex items-center gap-1.5 text-sm font-medium text-ink underline underline-offset-4 hover:text-accent"
                >
                  {link.label}
                  <ArrowUpRight className="size-3.5" aria-hidden="true" />
                </Link>
              </li>
            ))}
          </ul>
        </nav>
      </Container>
    </header>
  )
}

components/ui/status.tsx

import { CheckCircle2, AlertTriangle, XCircle, Info, CircleDashed, Clock } from 'lucide-react'
import { cn } from '@/lib/cn'

/**
 * Status
 *
 * Deliberately separate from Badge. A status describes the *state of a thing*
 * (a deployment, an invoice, a service) and therefore always pairs an icon
 * with a label — colour is the third signal, never the only one. That rule is
 * what makes the library legible to colour-blind users without a theme switch.
 */
export type StatusKind = 'operational' | 'degraded' | 'down' | 'pending' | 'info' | 'idle'

export interface StatusProps {
  kind: StatusKind
  label: string
  /** `dot` for dense tables, `pill` for standalone display. */
  appearance?: 'dot' | 'pill' | 'inline'
  className?: string
}

const config = {
  operational: {
    icon: CheckCircle2,
    text: 'text-success',
    bg: 'bg-success-soft border-success-line',
    dot: 'bg-success',
  },
  degraded: {
    icon: AlertTriangle,
    text: 'text-warning',
    bg: 'bg-warning-soft border-warning-line',
    dot: 'bg-warning',
  },
  down: {
    icon: XCircle,
    text: 'text-danger',
    bg: 'bg-danger-soft border-danger-line',
    dot: 'bg-danger',
  },
  pending: { icon: Clock, text: 'text-info', bg: 'bg-info-soft border-info-line', dot: 'bg-info' },
  info: { icon: Info, text: 'text-info', bg: 'bg-info-soft border-info-line', dot: 'bg-info' },
  idle: {
    icon: CircleDashed,
    text: 'text-ink-subtle',
    bg: 'bg-surface-sunken border-line',
    dot: 'bg-ink-subtle',
  },
} as const

export function Status({ kind, label, appearance = 'inline', className }: StatusProps) {
  const entry = config[kind]
  const Icon = entry.icon

  if (appearance === 'dot') {
    return (
      <span className={cn('inline-flex items-center gap-2 text-sm text-ink', className)}>
        <span className={cn('size-2 shrink-0 rounded-full', entry.dot)} aria-hidden="true" />
        {label}
      </span>
    )
  }

  if (appearance === 'pill') {
    return (
      <span
        className={cn(
          'inline-flex items-center gap-1.5 rounded-full border px-2.5 py-0.5 text-xs font-medium',
          entry.bg,
          entry.text,
          className,
        )}
      >
        <Icon className="size-3.5 shrink-0" aria-hidden="true" />
        {label}
      </span>
    )
  }

  return (
    <span
      className={cn('inline-flex items-center gap-1.5 text-sm font-medium', entry.text, className)}
    >
      <Icon className="size-4 shrink-0" aria-hidden="true" />
      {label}
    </span>
  )
}

Demo source — adapt to your project. Foundry is not published as a package.

Usage

A person, not a product. Availability is the one piece of information most visitors are actually here to check, so it is a Status component carrying an icon and a word rather than a coloured dot.

  • State the timezone range, not just the city — it is what a remote client needs.
  • Keep the section list to three; a personal site with nine sections is a company site.

Variants and states

Every entry below is a genuine difference in behaviour or layout, and every one of them is visible in the preview above.

  • Availability status
  • Location line
  • Underlined section links

Accessibility

Status
Availability pairs an icon with the word, so it survives greyscale.
Link affordance
Section links are underlined, not colour-only.

Foundry implements published ARIA patterns and is tested against them. No WCAG certification is claimed — see the accessibility documentation for what is and is not covered.