1 min read



Renders the results previews of a list of objects with the information about the query preview, and exposes the QueryPreview slots to modify the content. The requests are made in sequential order.


Name Description Type Default
animation Animation component that will be used to animate the elements. union 'ul'
queriesPreviewInfo The list of queries preview to render. Array


Name Description Bindings
(name - type - description)

See it in action

Here you have a basic example of how the QueryPreviewList is rendered. Keep in mind that this component is intended to be used overriding its default slot. By default it will only render the names of the results.

Play with the default slot

In this example, the results will be rendered inside a sliding panel.

Play with the result slot

The component exposes a slot to override the result content, without modifying the list.

In this example, the ID of the results will be rendered along with the name.

    class="x-flex x-gap-8"
    #result="{ result }"
    <span class="x-font-bold">{{ result.id }}:</span>
    <span>{{ result.name }}</span>
  import { QueryPreviewList } from '@empathyco/x-components/queries-preview';
  export default {
    name: 'QueryPreviewListDemoOverridingResultSlot',
    components: {
    data() {
      return {
        queriesPreviewInfo: [{ query: 'sandals' }, { query: 'tshirt' }, { query: 'jacket' }]