Coder Social home page Coder Social logo

shusq / autotype Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gigabyte5671/autotype

0.0 0.0 0.0 31 KB

A simple auto-typing/typewriter effect written in vanilla JS.

Home Page: https://autotype.zakweb.dev/

JavaScript 4.35% CSS 50.56% HTML 45.09%

autotype's Introduction

AutoType JS

A simple auto-typing/typewriter effect written in vanilla JS.

Demo

Usage:

Include:

<script src="https://gigabyte5671.github.io/AutoType/dist/autotype.min.js" type="text/javascript"></script>

Or download the files you want from the releases page.

To add the effect to a text element, call the AutoType() function with arguments for the text element's ID, the string you want typed, the delay between typed characters in ms, and optionally a callback function for when the effect has finished.

AutoType("element_ID", "Your Text Here", character_delay, <optional> callback);

AutoBackspace() can also be called with the same arguments (except the string to be typed) to get a backspacing effect:

AutoBackspace("element_ID", character_delay, <optional> callback);

CSS:

You can also use autotype.css to add a blinking cursor to the end of your autotyped text. Just add the autotype_horizontal_cursor or autotype_vertical_cursor class to the text element:

<link rel="stylesheet" href="https://gigabyte5671.github.io/AutoType/dist/autotype.min.css">  
  
<h1 id="elem" class="autotype_horizontal_cursor">Horizontal cursor!</h1>
<h1 id="elem" class="autotype_vertical_cursor">Vertical cursor!</h1>

Notes:

  • Autotype CSS will set the text element's position to relative.
  • This library creates two global variables "AutoTypeObjects" and "AutoBackspaceObjects".

autotype's People

Contributors

gigabyte5671 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.