--- title: Display results slug: latest-displaying-results canonical_url: https://docs.coveo.com/en/atomic/latest/usage/displaying-results/ collection: atomic source_format: adoc --- # Display results Displaying results in [Coveo Atomic](https://docs.coveo.com/en/lcdf0264/) is done by adding a result list component anywhere in the `atomic-search-interface` and giving it result templates to define how results are rendered. **HTML** ```html ... ... ``` **React** ```jsx ... ( <>

{"Title: "}

{"Description: "}

{result.raw.visibility === "confidential" && (

{"CONFIDENTIAL"}

)} )} /> ...
``` ![The results displayed by the template above](atomic/result-list-example-outcome.png) The results displayed by the template above. ## Result list components [Atomic](https://docs.coveo.com/en/lcdf0264/) includes two different result components you can choose between: ### `atomic-result-list` The [`atomic-result-list`](https://docs.coveo.com/en/atomic/latest/reference/components/atomic-result-list/) component can display results as a list, grid, or table. You can find extended documentation on how to use this component in the following: * [Displaying results as a list or grid](https://docs.coveo.com/en/atomic/latest/usage/displaying-results/list-or-grid/) * [Displaying results as a table](https://docs.coveo.com/en/atomic/latest/usage/displaying-results/table/) ![An `atomic-result-list` component with `display="list"`](atomic/result-list.png) An `atomic-result-list` component with `display="list"`. ![An `atomic-result-list` component with `display="grid"`](atomic/result-grid.png) An `atomic-result-list` component with `display="grid"`. ![An `atomic-result-list` component with `display="table"`](atomic/result-table.png) An `atomic-result-list` component with `display="table"`. ### `atomic-folded-result-list` The [`atomic-folded-result-list`](https://docs.coveo.com/en/atomic/latest/reference/components/atomic-folded-result-list/) component can display results hierarchically. To display results hierarchically, see [Implement folding](https://docs.coveo.com/en/atomic/latest/usage/displaying-results/folding/). ![An `atomic-folded-result-list` component with some "folded" results](atomic/result-hierarchy.png) An `atomic-folded-result-list` component with some "folded" results. ## Defining a result template Result templates define what HTML content should be displayed for each result returned by the user's [query](https://docs.coveo.com/en/231/). In HTML, they're defined by adding an `atomic-result-template` element inside the result list and adding a `template` element in the `atomic-result-template` element, like so: ```html ``` In React, they're defined by passing a callback to the `template` attribute of the result list, like so: ```jsx ( <>

{"Excerpt with highlighting: "}

{"Excerpt using JSX, without highlighting: "} {result.excerpt}

)} /> ``` ### Result template components To display result-specific information, use [result template components](https://docs.coveo.com/en/atomic/latest/reference/result-template-components/). ```html ``` ### Styling The contents of a template can be styled by adding a ` ``` **React** ```jsx const templateStyle = ` atomic-result-badge[label="On sale!"]::part(result-badge-element) { background-color: #44a1da; color: white; } `; // ... ( <> {result.raw["on-sale"] === "true" && ( )} )} /> ``` ### Result sections If you don't need a deep level of customization and want to render results following Coveo's mobile-friendly design, use [result sections](https://docs.coveo.com/en/atomic/latest/usage/displaying-results/result-sections/). When a result section element (prefixed with `atomic-result-section-`) is present at the root of the `