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.
Install using NPM or yarn
NPM:
npm install --save bbblink
Yarn:
yarn add bbblink
Import using ES6 import syntax
import { alltheBlinks } from "bbblink";
or import using CommonJS syntax
const alltheBlinks = require('bbblink')
-
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)
-
allTheBlinks(interval = 500)
Makes everything on your page blink at a given interval in ms.
alltheBlinks(500)
-
OBSOLETE
stopBlink()
Not recommended. Stops all current blinking processes.
stopBlink()
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!
Nar Shah |
Alli Colyer |
Michael Lu |