GithubHelp home page GithubHelp logo

components's Introduction

DarkWiiPlayer/components

A collection of self-contained custom elements that do somewhat complex things inside a website.

TypeWriter

<type-writer wait=1 type=0.1 back=0.06>
    <span>Some text to type</span>
</type-writer>

Control attributes:

  • wait: Time in seconds to wait after typing out the text before erasing.
  • type: The time in seconds between typing each character.
  • back: The time in seconds between erasing each character.
<type-writer>
    <span>Markup is <b>supported</b></span>
</type-writer>

Contents aren't typed out as HTML but as text, with nested DOM-nodes being created as needed. In other words, you can put more complex HTML inside of the type-writer items and it'll "just work". This hasn't been tested with any super-crazy layouts though.

<type-writer>
    <span>Cool</span>,
    <span>Great</span> and
    <span>Awesome</span>
</type-writer>

top-level text tags inside the type-writer light DOM are ignored, so you can put some text in between as a fallback. In the example above, if the TypeWriter element fails somehow, the user will see a comma-separted list of items.

<type-writer>
    <span>Cool</span>
    <template>Great</template>
    <template>Awesome</template>
</type-writer>

You can also put your content into templates, so in case the component can't be loaded, the user will just see the first item as static text.

ImageCarousel

A simple image carousel that scrolls through a list of images, then scrolls back to the start.

<image-carousel interval="3000">
    <img src="https://picsum.photos/1920/1080?random&1">
    <img src="https://picsum.photos/1020/1080?random&2">
    <img src="https://picsum.photos/1220/680?random&3">
</image-carousel>

components's People

Contributors

darkwiiplayer avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.