Traits are a lightweight way to create plain javascript components that play nicely with each other and with bigger frameworks like React, Angular, Vue, etc.
The API for most plain javascript components (sliders, buttons, click-to-drag, etc.) looks like something this:
let node = document.querySelector("#node")
let component = createComponent(node, /* config options */)