Docs menuSiteHeader
Docs/ Components/ SiteHeader

SiteHeader

The site navigation composition.

When to use

Use SiteHeader when a page needs the decadez brand mark, section navigation, theme switching, and a responsive menu in one composition.

Code demo

import { SiteHeader } from "@decadez/web-dev-ui";
import "@decadez/web-dev-ui/styles.css";

export default function App() {
  return (
    <SiteHeader
      brandHref="#"
      brandLabel="decadez"
      brandAccent=".dev"
      navLinks={[
        { url: "#projects", text: "Projects" },
        { url: "#blog", text: "Blog" },
        { url: "#contact", text: "Contact" },
      ]}
      currentSection="projects"
      theme="light"
    />
  );
}
Loading sandbox

API

PropTypeDefaultDescription
brandHrefstring"#"Destination for the brand link.
brandLogoReactNode<RiderKickLogo />Optional logo node replacing the default UI package logo.
brandLabelstring-Main brand text.
brandAccentstring-Optional accent text after the brand label.
navLinks{ url: string; text: string }[][]Navigation links rendered in the header.
currentSectionstring-Active section id.
theme"light" | "dark""light"Theme state used by the toggle.
onThemeToggle() => void-Callback fired by the theme button.