How to style an Easy Search input field?

I’ve looked all over but can’t find any examples of how to simply style the Easy Search input field when rendered as an inclusion like: {{> EasySearch.Input index=booksIndex}}

I’ve tried adding a surrounding div with some stylings for a search field, but no luck. Any suggestions on the simplest way to do this? Thanks in advance.

1 Like

Try to add ‘attributes’ parameter to your EasySearch.Input:

{{> EasySearch.Input index=booksIndex attributes=inputAttributes}}

And then add a helper like this one to your template:

inputAttributes: function () {
  return { class: 'my-class-name' }; 
}
1 Like

Thank you serg, it worked for me ! :ok_hand:

1 Like