I see this line of code in the lightning component library.

<aura:import library="lightningcomponentdemo:mockdataFaker" property="mockdataLibrary"/>
  1. How do I access this library component?
  2. I tried search for aura:import in the developer guide and could not find it's usage?

Can you please help?



1 Answer 1


aura:import is referenced by aura:library, which is part of the underlying framework for ltng:require. It is not part of the standard Lightning components, and cannot be used by developers. If you're interested, you can read more about it in aura:library, but this only matters if you're using Aura directly, and not developing in Lightning. None of this is for importing data, it's for importing JavaScript files into components.

  • thank you. In the above code snippet, where I found that in the Salesforce Lightning Component Library, how do I access that library and see the JS files in it.
    – SFG
    Oct 31, 2018 at 19:35
  • @SFG again, aura:import/aura:library is not meant to be used in Lightning. There's nothing in there for you unless you're working in Aura directly.
    – sfdcfox
    Oct 31, 2018 at 20:15
  • 5
    @sfdcfox I have also seen in places in the Lightning Component Library, for example in the lightning:datatable - they use <aura:import library="lightningcomponentdemo:mockdataFaker" property="mockdataLibrary"/> and I also tried to use it and failed. if we can't use it - they should not use it as an example... Nov 5, 2018 at 7:19
  • @ItaiShmida I agree, it's very frustrating as the examples are not usable
    – Jay
    Nov 11, 2018 at 22:11
  • see forum discussion developer.salesforce.com/forums/?id=9060G0000005m4vQAA Mar 20, 2020 at 8:56

You must log in to answer this question.

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