Jake Mulhern
Jake Mulhern

Reputation: 772

Styling infiniteHits with Algolia search

I have an Algolia search widget set up in my site, however the results all have their list number next to them. How do I style this to remove the numbers?

The docs have this under cssClasses.

instantsearch.widgets.infiniteHits({
  // ...
  cssClasses: {
    root: 'MyCustomInfiniteHits',
    list: [
      'MyCustomInfiniteHits',
      'MyCustomInfiniteHits--subclass',
    ],
  },
});

So I tried something like this.

instantsearch.widgets.infiniteHits({
  // ...
  cssClasses: {
    list: [
      'list-style: none',
    ],
  },
});

but the numbers still appear.

My widget is inside of a Django template if that helps and I am using instantsearch.js.

Upvotes: 1

Views: 237

Answers (1)

Jake Mulhern
Jake Mulhern

Reputation: 772

Ok, I actually figured it out. The string that you include inside of

list: [
    'customClass'
]

is the class that is applied to the element. So you can then just add styling to your stylesheet.

Upvotes: 1

Related Questions