6

I can find the lwc github repository. But when I look for github repository for built-in components like lightning-radio-group I can't seem to find them and the document sometimes is not sufficient. Any idea on that?

4
  • But documentation is available here - which I guess you already know, can you pls elaborate your question? Commented Sep 6, 2019 at 2:13
  • @salesforce-sas is that part not open-sourced?
    – Lance Shi
    Commented Sep 6, 2019 at 2:30
  • according to release notes, all LWC lib is open source, are you finding any differences? Commented Sep 6, 2019 at 2:33
  • @salesforce-sas The thing is I can't find the related components code in the lwc repo. Should be somewhere else. As I have stated, documentation is not sufficient sometimes. For example, two questions this morning - how to give help text to options in radio group and how to make some text bold in options. You simply can't resolve them by looking at the document
    – Lance Shi
    Commented Sep 6, 2019 at 2:39

2 Answers 2

5

The LWC framework (i.e. everything you need to make LWC work outside of Salesforce) is open-source. The individual bits that only work inside the Salesforce-hosted LWC (including Lightning Out, etc) are not open source. This is also true for Aura; the framework itself is open source, but the "secret sauce" (e.g. anything in ui:, force: and lightning:) are not open source.

As such, if you want to look at the source code for those components, you're left to using the browser's Developer Console (F12). As long as you're in Debug Mode, you can browse the framework source in the Developer Console.

As a special note, sometimes the Specification tab is indeed deficient in describing how to set some attributes. In this case, the Documentation tab should contain all the relevant rules. As a backup plan, you can look at the documentation for the Aura version of the same component. It is sometimes more complete, although be aware that differences between Aura and LWC components may exist.

8

For those coming along later, the LWC base components have now been open sourced (as of Dreamforce 2019) and can be found here: https://github.com/salesforce/base-components-recipes

You must log in to answer this question.

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