Custom Lookup Lightning Component

Lookups are very important components in Salesforce. Salesforce vide inputfield to handle the Lookup component out of the box. But they come with there own set of limitations. So today I have created a basic Lookup Lightning Component which we can easily use with our existing apps or component to make it work.


I tried to keep this component as simple as possible so I did not use any event to communicate data between component. Instead we have used two way binding to pass data between component. Also we have not used any third party library and only SLDS is used. So it will work in Locker service and can pass security review as well.

Here is the complete code.


Now this component support Dynamic Icon , Required, Dynamic Label. I will also add many other feature in this component to make it more better. You can also download complete code from Github repo as well.

Did you like this component or want to add any feature, report any bug. Just let me know in comments section. Happy Programming :).



9 thoughts on “Custom Lookup Lightning Component

  1. I cannot get this to work. I am trying to use it in a sandbox to lookup accounts and I have entered sample data.

  2. Hi,

    this works perfectly and it is a very good solution. I used the component as an input field on Account Object to a custom object.
    However, I have an extra requirement where i need:
    When editing the Account i need to display the selected value by the user on that account. I cannot find a way? Could you please help ?

  3. Hi George,

    This Component I want to use that In a Add Row and Delete row functionality in Salesforce while adding the Information and sending back to the Child Component and getting back to the Parent component can you please validate.

  4. Hi Tushar,

    I would like to use this component for my current work requirements. But I couldn’t find any license information for this component.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.