Header Shop
Store header with an announcement bar, logo, a navigation slot, a search slot that sits inline on wide screens and behind a button that opens an overlay on phones, and account and cart actions.
Parts
| Part | File | Does |
|---|---|---|
| HeaderShop | HeaderShop.vue | Shows an optional announcement, the logo, navigation, and search, account and cart buttons. |
Styling
All of Header Shop’s styles live in header-shop.json. New to styling in Frontic UI? How styling works →
Install
- npm packages
- @lucide/vue
Built from
API reference
Shows an optional announcement, the logo, navigation, and search, account and cart buttons. Renders a <header>.
Props 17
| Prop | Type | Default | |
|---|---|---|---|
| categories | NavigationCategory[] | [] | |
| |||
| pages | NavigationLink[] | [] | |
| |||
| menuLabel | string | — | |
| |||
| sheetTitle | string | — | |
| |||
| featuredCta | string | — | |
| |||
| announcement | string | '' | |
| |||
| logoText | string | 'STORE' | |
| |||
| logoSrc | string | '' | |
| |||
| homeHref | string | '/' | |
| |||
| cartCount | number | 0 | |
| |||
| searchLabel | string | 'Search' | |
| |||
| accountLabel | string | 'Account' | |
| |||
| cartLabel | string | 'Cart' | |
| |||
| cartOverflowLabel | string | '9+' | |
| |||
| class | ClassValue | — | |
| |||
| menu | string | '' | |
| |||
| menuOpen | boolean | false | |
| |||
Events 5
| Event | Payload | |
|---|---|---|
| search | — | |
| ||
| update:menu | value: string | |
| ||
| update:menuOpen | value: boolean | |
| ||
| account | — | |
| ||
| cart | — | |
| ||
Slots 2
| Slot | Slot props | |
|---|---|---|
| navigation | { categories: NavigationCategory[]; pages: NavigationLink[]; } | |
| ||
| search | { presentation: "inline" | "overlay"; } | |
| ||