Tessina UI
Tessina UI
GitHubIntroduction
InstallationUsageTheming
Components
ButtonIconButtonLinkSpinnerBadgeAvatarStatusChipShortcutSkeletonSurfaceProgressMeterRating
LabelFieldFieldsetCheckboxRadioSwitchSliderSelectComboboxSearchTextareaNumberFieldDate PickerTime PickerOTP InputFile UploadCalendar
AlertBannerToastTooltip
TabsAccordionCollapsibleBreadcrumbPaginationStepperSegmentedControlButtonGroupToggleButtonToggleGroupToolbarNavigation MenuMenubarBottom NavSidebar
Split ButtonFABDropdown MenuContextMenuCommandPopoverHoverCard
ContainerStackFlexGridAspectRatioSpacerCardCarouselDividerScroll Area
Table
ChatBubblePromptInputCodeBlock
ModalAlertDialogDrawerAction SheetTop Header MobileTop Header DesktopEmptyStateForm
Contributing
ComponentsSurfaces

Top Header Desktop

Desktop navigation bar with brand, nav, search, and actions slots. Six variants, five sizes, six rounded options, three nav-position modes (start/center/end), max-width containment, bordered, sticky, skeleton, and full RTL support.

Playground

Installation

pnpm add @tessinaui/ui

Usage

import {
  TopHeaderDesktop,
  TopHeaderDesktopBrand,
  TopHeaderDesktopNavList,
  TopHeaderDesktopNavItem,
  TopHeaderDesktopSearch,
  TopHeaderDesktopActions,
  TopHeaderDesktopIconButton,
  TopHeaderDesktopAvatar,
} from "@tessinaui/ui";
<TopHeaderDesktop
  bordered
  brand={
    <TopHeaderDesktopBrand href="/">
      <img src="/logo.svg" alt="Logo" className="h-8 w-8" />
    </TopHeaderDesktopBrand>
  }
  nav={
    <TopHeaderDesktopNavList>
      <TopHeaderDesktopNavItem active href="/">Home</TopHeaderDesktopNavItem>
      <TopHeaderDesktopNavItem href="/about">About</TopHeaderDesktopNavItem>
    </TopHeaderDesktopNavList>
  }
  search={
    <TopHeaderDesktopSearch
      icon={<Search className="size-4" />}
      placeholder="Search…"
    />
  }
  actions={
    <TopHeaderDesktopActions>
      <TopHeaderDesktopIconButton aria-label="Notifications">
        <Bell className="size-4.5" />
      </TopHeaderDesktopIconButton>
      <TopHeaderDesktopAvatar initials="JD" aria-label="Account" />
    </TopHeaderDesktopActions>
  }
/>

Showcase

API Reference

TopHeaderDesktop

PropTypeDefaultDescription
variant"filled" | "elevated" | "transparent" | "primary" | "on-color" | "blur""filled"Visual style
size"xs" | "sm" | "md" | "lg" | "xl""md"Height and padding scale
rounded"none" | "sm" | "md" | "lg" | "xl" | "full""none"Bottom corner rounding
brandReactNode—Leading brand / logo slot
navReactNode—Navigation slot — position controlled by navPosition
navPosition"start" | "center" | "end""start"Where to render the nav slot
searchReactNode—Search bar slot — fills the flex-1 middle zone
actionsReactNode—Trailing actions — icon buttons, CTA, avatar
borderedbooleanfalseRender a subtle border-b border-border
stickybooleanfalseApply sticky top-0 z-40
maxWidth"sm" | "md" | "lg" | "xl" | "2xl" | "full""full"Max-width of the inner content row
skeletonbooleanfalseShow animated skeleton
dir"ltr" | "rtl"—Text and layout direction

TopHeaderDesktopBrand

<a> element with consistent focus ring and flex gap.

PropTypeDefaultDescription
namestring—Optional brand name rendered next to children
hrefstring—Link destination

TopHeaderDesktopNavList

<ul> container for nav items. Accepts TopHeaderDesktopNavItem and TopHeaderDesktopNavDivider children.

TopHeaderDesktopNavItem

<a> styled as a nav link.

PropTypeDefaultDescription
activebooleanfalseMark as current page (aria-current="page", filled background)
hasDropdownbooleanfalseShow a chevron icon (visual only — wire up your own popover)

TopHeaderDesktopNavDivider

<li> vertical separator (w-px h-4 bg-border) between nav items.

TopHeaderDesktopSearch

Built-in search input with pill shape and optional leading icon.

PropTypeDefaultDescription
iconReactNode—Leading icon (e.g. <Search className="size-4" />)
placeholderstring"Search…"Input placeholder
containerClassNamestring—Override the wrapper div class (e.g. "max-w-sm")

All native <input> attributes are forwarded.

TopHeaderDesktopActions

<div> flex row wrapper for trailing action elements.

TopHeaderDesktopIconButton

<button> sized 36×36px, rounded-full, with muted icon coloring on rest.

PropTypeRequiredDescription
aria-labelstringYesVisually hidden label for screen readers

TopHeaderDesktopAvatar

Avatar <button> with image or initials fallback.

PropTypeDefaultDescription
srcstring—Image URL — renders <img> when provided
initialsstring—Short text shown when no image
aria-labelstring"Account"Visually hidden label

Variants

Filled (default)

Solid bg-background surface. Standard app bar.

Elevated

Same as filled with shadow-sm. Use when the header floats above scrollable content.

Transparent

No background. Overlays hero images or gradient banners — pass className="absolute inset-x-0 top-0" on the header.

Primary

Brand-coloured background. Override nav item and icon classes with text-on-primary tokens.

On Color

Dark foreground background with light text. Ideal for dark-mode-first or inverted hero sections.

Blur

Frosted-glass effect (backdrop-blur-md). Best combined with sticky and bordered.

Nav Position Modes

start (default)

Nav renders immediately after the brand. Search fills the remaining middle space. Matches Mobbin, Dribbble, Paraform.

center

Nav is absolutely centred in the header. Search renders in the trailing section. Matches Apple.

end

Nav renders in the trailing section, before actions. Spacer fills the middle. Good for minimal two-item menus.

Layout Patterns

Search-forward (Mobbin / Dribbble)

navPosition="start" + prominent search slot. Nav links are secondary; search is the primary interaction.

Marketing (Wise / Linear)

navPosition="start" + no search + actions with Log in / Sign up buttons.

Centred nav (Apple)

navPosition="center" + icon-only actions. Nav is the primary interaction.

App shell

navPosition="start" + full-width search + rich actions (notifications, avatar). Use maxWidth="2xl" with a constrained inner row.

Keyboard Navigation

KeyAction
TabMove focus between interactive elements
Enter / SpaceActivate focused link or button

Accessibility

  • Uses <header role="banner"> as a landmark
  • <nav aria-label="Main"> wraps all nav slots
  • Active nav item gets aria-current="page"
  • All icon buttons require a visible aria-label
  • Avatar button defaults to aria-label="Account"
  • dir="rtl" flips the entire layout via CSS logical properties
  • Focus rings visible on keyboard navigation (focus-visible:ring-2)

Top Header Mobile

Mobile-first top app bar with leading/trailing action slots, centered or start-aligned title, five variants, five sizes, six rounded options, three layout modes (small/medium/large), collapsible state, and full RTL support.

EmptyState

Centered surface for "no data here" — empty lists, search results, tables, dashboards, inboxes, 404s, first-run / onboarding moments. Three variants, four sizes, six intents tinting the icon tile, primary + secondary actions, optional footer, LTR/RTL.

On this page

PlaygroundInstallationUsageShowcaseAPI ReferenceTopHeaderDesktopTopHeaderDesktopBrandTopHeaderDesktopNavListTopHeaderDesktopNavItemTopHeaderDesktopNavDividerTopHeaderDesktopSearchTopHeaderDesktopActionsTopHeaderDesktopIconButtonTopHeaderDesktopAvatarVariantsFilled (default)ElevatedTransparentPrimaryOn ColorBlurNav Position Modesstart (default)centerendLayout PatternsSearch-forward (Mobbin / Dribbble)Marketing (Wise / Linear)Centred nav (Apple)App shellKeyboard NavigationAccessibility