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
    Commented May 1, 2019 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
    Commented May 1, 2019 at 4:29
  • Found example with button, same idea - put spinner in input element body doesn't work.
    – dzh
    Commented May 1, 2019 at 4:35
  • Try wrapping lightning button inside a div with class 'slds-is-relative'.
    – Raul
    Commented May 1, 2019 at 7:26

1 Answer 1


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
    Commented May 1, 2019 at 11:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .