timonson / switchwitch

Web Component using Shadow DOM - Cycle through various media gracefully

Home Page:https://timonson.github.io/switchwitch/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

switchwitch

A Web Component using the Shadow DOM - Cycle through various media gracefully.

Demo

Click.

Qick Start

Serve the file demo.html to your browser.

Example

<body>
  <switch-witch
    id="switcher"
    indexes="ABCDE"
    width="50em"
    height="25em"
    loop="4000"
    color="#f0ede2"
  >
  </switch-witch>
  <script type="module">
    import data from "./demo-data/inputData.js"
    switcher.data = data
  </script>
</body>

API

"width",
"height",
"color",
"border-color",
"indexes",
"active-index",
"loop",
"data",
"item"

About

Web Component using Shadow DOM - Cycle through various media gracefully

https://timonson.github.io/switchwitch/

License:MIT License


Languages

Language:JavaScript 94.4%Language:HTML 5.6%