Skip to main content

Documentation Index

Fetch the complete documentation index at: https://araf.badr.co.id/llms.txt

Use this file to discover all available pages before exploring further.

Overview

Header Navigation is a horizontal navigation component placed at the top of the page. It supports a logo, menu items with or without dropdowns, and action buttons on the right side.

Type: Default

A’raf DS
HomeProducts Solutions About

Type: Standard (with dropdown)

A’raf DS
HomeProducts Solutions About

Design System

Build consistent UIs with our design tokens and components.

Component Library

Reusable, accessible components for your product.

Figma Kit

Design-ready assets and templates in Figma.

Installation

npm install @araf-ds/core

Usage

import { HeaderNavigation, NavItem, NavDropdown, NavigationActions } from "@araf-ds/core";

export default function App() {
  return (
    <HeaderNavigation type="standard">
      <NavItem href="/home">Home</NavItem>
      <NavDropdown label="Products">
        <NavDropdown.Item href="/design-system" description="Build consistent UIs">
          Design System
        </NavDropdown.Item>
        <NavDropdown.Item href="/components" description="Reusable components">
          Component Library
        </NavDropdown.Item>
      </NavDropdown>
      <NavItem href="/about">About</NavItem>

      <NavigationActions slot="actions">
        <Button variant="secondary-gray">Sign In</Button>
        <Button variant="primary">Get Started</Button>
      </NavigationActions>
    </HeaderNavigation>
  );
}

Type Variants

Header Navigation has 7 layout types that determine how menu items and sub-menus are displayed.
Logo and nav items aligned in the center, CTA button on the right. No dropdown.
A’raf DS
HomeProductsSolutionsAbout
<HeaderNavigation type="default">
  <NavItem href="/home">Home</NavItem>
  <NavItem href="/products">Products</NavItem>
  <NavItem href="/solutions">Solutions</NavItem>
  <NavItem href="/about">About</NavItem>
</HeaderNavigation>

Breakpoints

Header Navigation supports two breakpoints: Desktop (1440px) and Mobile Responsive (360px).
Header width 1440px with content centered in a 1200px container. Logo, nav items, and CTA button are displayed horizontally.
A’raf DS
HomeProducts ▾Solutions ▾About
PropertyValue
Header width1440px
Container width1200px
Height80px
Nav item spacing24px
Nav item font size16px (Inter Medium)

Mobile Header Navigation

For mobile views specifically, 4 size configurations are available.

small-centered (56px)

Page Title

small (56px)

Page Title

medium (108px)

Page Title

Supporting description text for the page.

large (152px)

Page Title

Supporting description text for the page.

ConfigurationHeightDescription
small-centered56pxCentered title, back button on left, action on right
small56pxLogo/back on left, title on left, action on right
medium108pxLogo + title + supporting text
large152pxLogo + title + supporting text + action buttons
import { HeaderNavigationMobile } from "@araf-ds/core";

<HeaderNavigationMobile
  configuration="large"
  title="Products"
  description="Browse our complete product catalog."
  trailingIcon1={<SearchIcon />}
  trailingIcon2={<NotificationIcon />}
/>
A slot on the right side of the header for displaying authentication buttons. Two states are available: Logged Out (Sign In + CTA) and Logged In (avatar or user menu).

Logged Out (default)

Logged In

AB
Ahmad Badr
// Logged out state
<NavigationActions loggedIn={false}>
  <Button variant="secondary-gray">Sign In</Button>
  <Button variant="primary">Get Started</Button>
</NavigationActions>

// Logged in state
<NavigationActions loggedIn={true}>
  <UserMenu user={{ name: "Ahmad Badr", avatar: "/avatar.jpg" }} />
</NavigationActions>

Standard Sub Menu

A compact dropdown card (480px) displaying a vertical list of items with a title and description.
TokenValue
Background#FFFFFF
Border1px solid #F4F4F5
Border radius8px
Padding24px
Shadowxl (0px 20px 24px -4px)
Width480px

Full Width Sub Menu

A full-width dropdown (1440px) with a featured panel on the left and 3 columns on the right.
TokenValue
Background#FFFFFF
Padding64px 120px
Shadowlg (0px 12px 16px -4px)
Featured text color#011829 (Black)
Featured CTA bg#F0F9FF
Featured CTA text#045CA0
Item title color#52525B
Item desc color#71717A

API Reference

HeaderNavigation

type
"default" | "standard" | "standard-with-icon" | "full-width" | "full-width-with-icon" | "simple" | "simple-with-icon"
default:"\"default\""
The navigation layout type, which determines the dropdown menu style.
breakpoint
"desktop" | "mobile-responsive"
default:"\"desktop\""
The rendering breakpoint. In mobile-responsive mode, nav items are replaced by a hamburger menu.
The logo content on the left side of the header (logomark + wordmark).
sticky
boolean
default:"false"
Whether the header stays fixed at the top during scroll (position: sticky).
className
string
Additional class for custom styling.
href
string
required
The navigation destination URL.
active
boolean
default:"false"
Marks the item as the currently active page.
children
ReactNode
required
The nav item text label.
label
string
required
The dropdown trigger text.
Featured panel content (only for full-width and full-width-with-icon types).
href
string
required
The dropdown item’s destination URL.
description
string
A short description text below the label. Not displayed for the simple type.
icon
ReactNode
Icon on the left side of the item. Required for *-with-icon types.

HeaderNavigationMobile

configuration
"small-centered" | "small" | "medium" | "large"
required
The size and layout of the mobile header.
title
string
The page title displayed at the center or left of the header.
description
string
Supporting description below the title (only for medium and large).
trailingIcon1
ReactNode
The first icon on the right side of the header.
trailingIcon2
ReactNode
The second icon on the right side of the header.
trailingIcon3
ReactNode
The third icon on the right side of the header.

Accessibility

Header Navigation follows the WAI-ARIA patterns for navigation landmark and disclosure widget.
  • Use a <nav> element with aria-label="Main navigation" as the wrapper
  • Dropdown buttons must use aria-expanded (true/false) and aria-haspopup="true"
  • The dropdown panel uses role="menu" with items typed as role="menuitem"
  • Press Escape to close an open dropdown
  • Keyboard navigation: Tab between items, Enter/Space to open a dropdown, Arrow keys for items within the dropdown
  • The mobile hamburger button uses aria-label="Open menu" / aria-label="Close menu"
  • The logo link has aria-label="Go to homepage"

Do’s & Don’ts

Do

  • Use a single Header Navigation per page
  • Limit the number of nav items at the top level (maximum 5–6 items)
  • Use the full-width type for menus with many sub-categories
  • Ensure the active item is marked with the primary color (#0479CE)
  • Include NavigationActions with a clear CTA

Don't

  • Don’t nest dropdowns more than 2 levels deep
  • Don’t put more than 3 columns in a Standard sub menu
  • Don’t use overly long nav item text (max ~2 words)
  • Don’t remove the logo from the header
  • Don’t use the Desktop breakpoint on screen widths < 768px