SearchProductRecommendations
Connected recommendation section that resolves search-backed products and feeds them into the standard ProductRecommendations plus ProductCard family.
Best for
Import
import { SearchProductRecommendations } from "@enadhq/enad-react-sdk/client/search"When to use it
Use SearchProductRecommendations when the page wants the SDK to resolve the recommendation products and then render them through the standard ProductRecommendations section family.
It is the fast path for:
- related-product sections driven by a known SKU list
- recommendation rails driven by category URLs, tag keys, or brand slugs
- pages that want the existing recommendation shell without manually wiring the search queries first
If the page already owns the recommendation products, stay on ProductRecommendations instead.
Composition notes
SearchProductRecommendations keeps the family boundary clear:
ProductRecommendationsstays the presentational section shell- nested
ProductCardinstances stay presentational product cards - the connected wrapper owns the Search GraphQL lookup and the product-to-card mapping
The source input supports multiple connected recommendation strategies:
skuscategoryUrlstagKeysbrandSlugs
productCard lets you tune the nested card presentation, and resolveProductHref is where storefront navigation should be attached.
If you need custom loading, error, or empty-state handling around the section, drop to useSearchProductRecommendations() and render ProductRecommendations yourself.
import { EnadProvider } from '@enadhq/enad-react-sdk';
import { SearchProductRecommendations } from '@enadhq/enad-react-sdk/client/search';
<EnadProvider clientConfig={clientConfig}>
<SearchProductRecommendations
title="You may also like"
source={{
type: 'skus',
skus: ['OAK-TABLE-001', 'OAK-CHAIR-006', 'BRASS-LAMP-005'],
}}
limit={3}
showArrows
resolveProductHref={(product) => `/products/${product.slug}`}
productCard={{ layout: 'gallery', imageBehavior: 'single' }}
/>
</EnadProvider>;
Behavior and theming guidance
The final section still behaves like ProductRecommendations, so keep the merchandising tone, arrows, aside content, and nested card treatment aligned with the presentational family.
Use the connected wrapper when product resolution is the variable. Use the presentational family when the section already has its products and only the recommendation shell varies.
Slots
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| source | string | — | No description yet. |
| productCard | string | — | No description yet. |
| title | string | — | Optional heading for the recommendation section |
| variant | string | — | Optional variant label for styling/semantics |
| body | string | — | Optional supporting copy below the heading |
| aside | string | — | Optional supporting editorial or utility block alongside the products |
| footer | string | — | Optional supporting footer below the recommendation content |
| viewAllHref | string | — | "View all" link |
| viewAllLabel | string | — | No description yet. |
| showArrows | boolean | — | Show navigation arrows on desktop |
| delight | number | — | Delight level (0-100) for stagger entry animation. 0 = no animation. |
| classNames | Partial<Record<import("@enadhq/enad-react-sdk/client/storefront/index").ProductRecommendationsSlot, string>> | — | No description yet. Slot keys asidebodyfooterheadercontentheadingrootheadingGroupactionLinkproductsrailitemprevButtonnextButton |
| className | string | — | No description yet. |
| limit | number | — | No description yet. |
| enabled | boolean | — | No description yet. |
| excludeSkus | string | — | No description yet. |
| maxSwatches | number | — | No description yet. |
| contextOverrides | string | — | No description yet. |
| resolveProductHref | string | — | No description yet. |