chrome
Ez az oldal még csak angolul érhető el.
The header, footer and promo bar and their pieces: brand, user menu, switchers, mobile menu and colour mode.
Ezen az oldalon
import { … } from '@poltura/theme-sdk/chrome';Hooks
| Name | What it is |
|---|---|
useHeader | The data a header draws from: categories, languages, the signed-in shopper and how the header scrolls. |
useLocaleSwitcher | The language choice. |
useCurrencySwitcher | The currency choice. |
useStorefrontSwitcher | The storefront choice. |
useMobileMenu | The mobile menu's state, shared by every component on the page: the button that opens it and the drawer that shows it. |
useHeaderVisibility | The header's scroll state. |
usePromoBar | The announcement strip's text and link, live while the merchant edits it. |
Parts
| Name | What it is |
|---|---|
Brand | The store's logo linking home, with the dark-scheme logo under a dark colour scheme, or its initial and name when it has none. |
Logo | The store's logo at a set width, with its dark-scheme variant, falling back to the store's name. |
ColorModeToggle | Switches the storefront between light and dark, with the transition the theme sets. |
Defaults
| Name | What it is |
|---|---|
LocaleSwitcher | The complete language and currency switcher: each group shows only when it offers a choice, and with neither it draws nothing. |
CurrencySwitcher | The currency switcher on its own, drawn only when the storefront offers more than one currency. |
MobileMenu | The mobile menu drawer: open while useMobileMenu says so, closed when a link in it is followed or the page changes. |
PromoBar | The announcement strip above the header, drawn only while it is on and has text. |
UserMenu | The account button and its menu: sign in and register for guests; the account, the orders and sign out once signed in. |
LocaleBanner | Suggests a storefront or a language. |
Header | The store's header: the promo bar and the header section group in the pinned box the header's scroll settings drive. |
Footer | The store's footer: the footer section group as the merchant arranged it. |
Types
| Name | What it is |
|---|---|
HeaderSticky | How the header behaves as the page scrolls, as the merchant set it. |
HeaderData | What a header draws from, so a theme's header takes no props. |
LocaleSwitcherState | Language choice state. |
LocaleSwitcherProps | Props of LocaleSwitcher. |
CurrencySwitcherState | Currency choice state. |
CurrencySwitcherProps | Props of CurrencySwitcher. |
StorefrontChoice | A market. |
StorefrontSwitcherState | Storefront choice state. |
MobileMenuState | The mobile menu's state, shared by the button that opens it and the drawer that shows it. |
MobileMenuProps | Props of MobileMenu. |
HeaderVisibility | Header scroll state. |
PromoBarState | The announcement strip above the header, as the merchant wrote it. |
PromoBarProps | Props of PromoBar. |
BrandClasses | Class names for the pieces of Brand. |
BrandProps | Props of Brand. |
LogoProps | Props of Logo. |
UserMenuProps | Props of UserMenu. |
LocaleBannerProps | Props of LocaleBanner. |
ColorModeToggleProps | Props of ColorModeToggle. |