Skip to content

Website Header

Website Header components are used to display the header of the website. They are commonly used in websites like Hubtel Web to provide a navigation menu and a logo used to identify the website.

Loading Code Block...
Loading Code Block...
PropsDefaultTypeDescription
logonullReactNodeThe logo to display in the header.
logoHrefnullstringThe href of the logo.
navLinksnullarrayThe navigation links to display in the header. This is an array of objects with label, dropdownOptions [value, label, href].
isAuthenticatedfalsebooleanWhether the user is authenticated or not.
notificationCount0numberThe number of notifications to display in the header.
cartCount0numberThe number of items in the cart.
slotContentnullReactNodeSlot area for the default type (can be used to add the search bar)
profileDrawerContentnullReactNodeSlot area for the profile drawer content
cartDrawerContentnullReactNodeSlot area for the cart drawer content
onMenuClicknullfunctionFunction to handle the menu click
onNotificationClicknullfunctionFunction to handle the notification click
onCartClicknullfunctionFunction to handle the cart click
activeAccountnullstringThe active account to display in the header.
availableAccountsnullarrayThe available accounts to display in the header.
onAccountSwitchnullfunctionFunction to handle the account switch
customMenuItemsnullarrayThe custom menu items to display in the header.
showNotificationstruebooleanWhether to show the notifications in the header.
showCartfalsebooleanWhether to show the cart in the header.
pageTitlenullstringPage title for subpages type
icon
icon icon icon icon