Source code for lwc components?

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


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.