(
<>
{"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 `` element of a result template, its styling will automatically adapt.
```html
```

A result list with sections on a mobile device.
### Result template conditions
It's also possible to define multiple different result templates that are displayed conditionally to a [field](https://docs.coveo.com/en/200/) containing a particular value.
**HTML**
```html
```
**React**
```jsx
const YoutubeTemplate = ({ result }) => <>{/* Some template content */}>;
const DefaultTemplate = ({ result }) => <>{/* Some template content */}>;
// ...
result.raw.source === "YouTube" ? (
) : (
)
}
/>
```
### Table result templates and folded result templates
Table result templates and folded result templates are defined slightly differently.
See:
* [Display results as a table](https://docs.coveo.com/en/atomic/latest/usage/displaying-results/table/)
* [Implement folding](https://docs.coveo.com/en/atomic/latest/usage/displaying-results/folding/)