8000 GitHub - medhatnar/bbblink: if you ain't blinking, you ain't living
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

medhatnar/bbblink

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bbblink 👁️ (Bring Back Blink)

bbblink an open-source library for making your DOM elements appear and disappear and appear and disappear...

Blink provides the polyfill you need to reverse the disastrous decision made in 2014 to remove the blink HTML tag.

Documentation

Installation

Install using NPM or yarn

NPM: npm install --save bbblink

Yarn: yarn add bbblink

Usage

Import using ES6 import syntax

import { alltheBlinks } from "bbblink";

or import using CommonJS syntax

const alltheBlinks = require('bbblink')

Functions

  1. makeBlink(DOM Element, interval = 500)

    Makes an element on your page blink at a given interval in ms.

    el = getElementbyId("not-blinking")
    makeBlink(el, 300)
    

    gif of make blink

  2. allTheBlinks(interval = 500)

    Makes everything on your page blink at a given interval in ms.

    alltheBlinks(500)
    

    gif of all the blinks

  3. OBSOLETE stopBlink()

    Not recommended. Stops all current blinking processes.

    stopBlink()
    

    gif of stop blink

React Example

Use bbblink with React event handlers.

import React, { useEffect } from "react";
import { allTheBlinks, makeBlink, stopBlink } from "bbblink";
import "./styles.css";

export default function App() {
  useEffect(() => {
    allTheBlinks();
  }, []);

  return (
    <div className="App">
      <h1  => makeBlink(event.target)}>Hello CodeSandbox</h1>
      <h2  => stopBlink()}>
        Start editing to see some magic happen!
      </h2>
    </div>
  );
}

Try it on Code Sandbox!

Edit floral-rgb-k7mnj

Created by

Picture of Nar Shah
Nar Shah
Picture of Allison Colyer
Alli Colyer
Picture of Michael Lu
Michael Lu

About

if you ain't blinking, you ain't living

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  
0