CBP (component based programming) has been around (at least the idea has) since the 60s. It is the holy grail of some developers; being able to compose apps from a collection of components that work everywhere. I don't believe anyone has ever truly reached that goal. But surely it'll work this time because of JavaScript.
They're mainly for react, though other platforms have them (eg, I use 'ractive', from the guardian, which has its own component model).
Go check out npm, there are a while bunch of react components you can just pick up and use.