Components: Sections
Home page and landing sections: tabbed product rows (best sellers, deals, categories), featured categories, blog posts, brands, gift deals and trust badges.
Generated from apps/theme/src/components/sections/: 9 files, 11 components. Import a component through the @/components/… path shown, so a fork can override it in src/custom/.
@/components/sections/best-sellers-tab-section
apps/theme/src/components/sections/best-sellers-tab-section.tsx client component
<BestSellersTabSection>
| Prop | Type | Description |
|---|---|---|
sectionLabel | string | Small uppercase label above the title. |
title | string | Main heading. |
allLabel | string | Label for the store-wide "All" tab. |
allProducts | RankedProduct[] | Pre-loaded, server-rendered store-wide ranking (the "All" tab). |
categoryTabs | BestSellerCategoryTab[] | Category tabs whose rankings are fetched on first click. |
columns? | ProductGridColumns | Widest (desktop) column count, so this page lays out exactly like the category / search listings. The page passes layout.productGridColumns; this component is a client component and so must not read #config itself. |
@/components/sections/blog-posts-section
apps/theme/src/components/sections/blog-posts-section.tsx server component
<BlogPostsSection>
| Prop | Type | Description |
|---|---|---|
posts | BlogPost[] | |
sectionLabel? | string | Section heading label (small uppercase text above the title). |
title? | string | Section title. |
showViewAll? | boolean | When true, renders a "View all" link to /blog. |
firstCardLarge? | boolean | When true, renders the first card with the large hero style. |
@/components/sections/brands-page-section
apps/theme/src/components/sections/brands-page-section.tsx client component
<BrandsPageSection>
| Prop | Type | Description |
|---|---|---|
brands | ManufacturerBrand[] |
@/components/sections/category-products-tab-section
apps/theme/src/components/sections/category-products-tab-section.tsx client component
<ProductSliderSkeleton>
The slider's placeholder, in the same box as the live slider (same slide widths, gutter and two-card stacks), so neither a lazy tab's load nor the homepage's route loading.tsx shifts the page when products arrive.
| Prop | Type | Description |
|---|---|---|
columns | ProductGridColumns | |
label | string |
<CategoryProductsTabSection>
| Prop | Type | Description |
|---|---|---|
sectionLabel | string | Small uppercase label rendered above the section title (e.g. "Featured"). |
title | string | Main section heading (e.g. "Best Sellers"). |
groups | CategoryProductGroup[] | Pre-loaded groups (at least one, server-rendered). |
lazyTabs? | LazyTabConfig[] | Additional tabs whose products are fetched client-side on first click. |
@/components/sections/coupon-deals-section
apps/theme/src/components/sections/coupon-deals-section.tsx client component
<CouponDealCard>
One coupon: its text, value, validity and the code with a copy button.
| Prop | Type | Description |
|---|---|---|
deal | CouponDeal | |
onExpire? | (ruleId: number) => void | Called with the rule id once the countdown reaches zero. Keep it stable. |
<CouponDealsSection>
The "Coupons" tab panel of <DealsTabSection> (Magenx_DealGraphQl couponDeals): one card per coupon code the merchant marked "Show on Storefront". The list is cached server-side, so a coupon whose end passes while the page is open — or before the cache refreshes — is hidden here.
| Prop | Type | Description |
|---|---|---|
deals | CouponDeal[] |
@/components/sections/deals-tab-section
apps/theme/src/components/sections/deals-tab-section.tsx client component
<DealsTabSection>
| Prop | Type | Description |
|---|---|---|
sectionLabel | string | Small uppercase label above the title. |
title | string | Main heading. |
allLabel | string | Label for the "All" tab. |
allProducts | ProductInterface[] | Pre-loaded, server-rendered "All" deals. |
giftDeals? | GiftDeal[] | Pre-loaded gift deals (free product added by a Cart Price Rule). Shown as a trailing "Free gifts" tab; the tab is omitted when empty. |
couponDeals? | CouponDeal[] | Pre-loaded coupon deals (coupon codes the merchant marked "Show on Storefront"). Shown as a trailing "Coupons" tab; omitted when empty. |
columns? | ProductGridColumns | Widest (desktop) column count, so this page lays out exactly like the category / search listings. The page passes layout.productGridColumns; this component is a client component and so must not read #config itself. |
@/components/sections/featured-categories-section
apps/theme/src/components/sections/featured-categories-section.tsx server component
<FeaturedCategoriesSection>
| Prop | Type | Description |
|---|---|---|
categories | CategoryTree[] |
@/components/sections/gift-deals-section
apps/theme/src/components/sections/gift-deals-section.tsx client component
<GiftDealsSection>
Gift deals on /deals (Magenx_DealGraphQl giftDeals): a free product a Cart Price Rule adds to the cart while the shopper qualifies. Each gift is the same ProductCard as the other deal tabs, with the rule's own label ("Free tote bag with orders over €50") in its footer; the gift is added automatically, which the subtitle says once for the whole grid. Rendered as the "Free gifts" tab panel of <DealsTabSection>, which owns the tab (and hides it when there are none).
| Prop | Type | Description |
|---|---|---|
deals | GiftDeal[] | |
columns? | ProductGridColumns | Widest column count, the same one the other deal tabs use. |
@/components/sections/trust-badges-section
apps/theme/src/components/sections/trust-badges-section.tsx server component
<TrustBadgesSection>
No props.