Build Reusable UI in Javascript