At the moment I have spinner next to my search field, but it's wonky.

What is preferred way to display spinners for search fields?

Current solutions is...


Essentially I want something similar that's done in some buttons that Salesforce use themselves:


button overlay example

  • What does your actual code look like? A proof of concept would help a long ways in fixing the issue.
    – sfdcfox
    May 1 '19 at 4:13
  • Well was hoping to get some code out as an answer. Don't wanna fix existing issue, I wanna see if there's official way to overlay spinner over input field. I've seen buttons with spinners inside, but can't find that code anymore...
    – dzh
    May 1 '19 at 4:29
  • Found example with button, same idea - put spinner in input element body doesn't work.
    – dzh
    May 1 '19 at 4:35
  • Try wrapping lightning button inside a div with class 'slds-is-relative'.
    – Raul
    May 1 '19 at 7:26

This link might help you.


Type something and then press enter, you will see the loading spinner there.

  • 1
    Excellent! Exactly what I needed!
    – dzh
    May 1 '19 at 11:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.