A simple example of using shadow DOM and custom element with plain javascript, HTML5 & CSS3.
Controlling the elements position with passing arguments to the element.
Link to demonstration of a custom element: https://psilore.github.io/shadow-root/demo/