atomic-recs-list
atomic-recs-list
This is for:
DeveloperThe atomic-recs-list
component displays recommendations by applying one or more result templates.
Properties
Property | Attribute | Description | Type | Default |
---|---|---|---|---|
|
|
The spacing of various elements in the result list, including the gap between results, the gap between parts of a result, and the font sizes of different parts in a result. |
|
|
|
|
The layout to apply when displaying results themselves. This does not affect the display of the surrounding list itself. To modify the number of recommendations per column, modify the --atomic-recs-number-of-columns CSS variable. |
|
|
|
|
The target location to open the result link (see target).
This property is only leveraged when |
|
|
|
|
The heading level to use for the heading label, from 1 to 6. |
|
|
|
|
The expected size of the image displayed in the results. |
|
|
|
|
The non-localized label for the list of recommendations. |
|
|
|
|
The total number of recommendations to display. This does not modify the number of recommendations per column. To do so, modify the --atomic-recs-number-of-columns CSS variable. |
|
|
|
|
The number of recommendations to display, per page. Setting a value greater than and lower than the numberOfRecommendations value activates the carousel. This does not affect the display of the list itself, only the number of recommendation pages. |
|
|
|
|
The Recommendation identifier used by the Coveo platform to retrieve recommended documents. Make sure to set a different value for each atomic-recs-list in your page. |
|
|
Methods
nextPage
Moves to the next page, when the carousel is activated.
Signature: nextPage() => Promise<void>
Returns: Promise<void>
previousPage
Moves to the previous page, when the carousel is activated.
Signature: previousPage() => Promise<void>
Returns: Promise<void>
setRenderFunction
Sets a rendering function to bypass the standard HTML template mechanism for rendering results. You can use this function while working with web frameworks that don’t use plain HTML syntax, e.g., React, Angular or Vue.
Do not use this method if you integrate Atomic in a plain HTML deployment.
Signature: setRenderFunction(resultRenderingFunction: ResultRenderingFunction) => Promise<void>
Returns: Promise<void>
Shadow Parts
Part | Description |
---|---|
|
The active indicator. |
|
A single indicator. |
|
The list of indicators. |
|
The label of the result list. |
|
The next button. |
|
The previous button. |
|
The element containing the list of results. |
|
The clickable link encompassing the result. |
|
The parent of the result & the clickable link encompassing it. |
CSS Custom Content
Name | Description |
---|---|
|
Number of columns for the recommendation list. |