Dashral Pro is on the wayGet 30% off at launch

Dashral

Website header

A marketing navbar: a product menu with descriptions, sign in and sign up, and a menu sheet on phones.

$ pnpm dlx shadcn@latest add @dashral/website-header

When to use

  • A marketing site's navbar: menus with descriptions, sign in and sign up, and a sheet on phones.
  • Product sites with several areas (product, solutions, resources) to point people to.

When not to use

  • Inside an app: Dashboard header or Workspace header.
  • Sites with only a few pages: Pill header is lighter.

Usage

Website header with your own data: every prop has the sample as its default, so pass only what you have.

example.tsx
import { WebsiteHeader } from "@/components/dashral/blocks/website-header"

<WebsiteHeader
  brand={{ name: "Acme", href: "/", logo: <Logo /> }}
  nav={nav}
  signIn={{ label: "Sign in", href: "/login" }}
  cta={{ label: "Start free", href: "/register" }}
/>

API reference

WebsiteHeader

A marketing site's navbar: the logo, menus with a line on each item, plain links, and sign in / sign up. On phones the links move into a sheet, the menus becoming sections that open in place. Every part comes from props.

PropTypeDefault
brand{ name: string; href: string; logo?: React.ReactNode }sample
navNavItem[]sample
signInBlockAction | null

The quiet button before the main one; null hides it.

sample
ctaBlockActionsample

type MenuEntry

An item in a menu: an icon, a title, a line, and where it goes.

PropTypeDefault
iconReact.ComponentType<{ className?: string; "aria-hidden"?: boolean }>—
titlestring—
textstring—
hrefstring—

type NavItem

A nav item: a plain link, or a menu that opens a panel (two columns past three items), with a promo under it.

= | { label: string; href: string; icon?: React.ComponentType<{ className?: string; "aria-hidden"?: boolean }> } | { label: string; items: MenuEntry[]; promo?: { label: string; text: string; href: string } }

type BlockAction

A button: a link with href, or your handler with onClick.

PropTypeDefault
labelstring—
hrefstring—
onClick() => void—