1.0.0 ā€¢ Published 4 years ago

wavescrollbar-react v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

šŸŒ Description

šŸ“ Philosophy

šŸ“¦ Installation

To start using Wavescrollbar you need to install it with the package manager npm or yarn, as shown in the next section or download it directly!

// To install using npm
npm install wavescrollbar -S

// Para instalar mediante yarn
yarn add wavescrollbar

ā–¶ļø Getting started

HTML

<!DOCTYPE html>
<html lang="en">
<head>
   <meta charset="UTF-8">
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   <meta http-equiv="X-UA-Compatible" content="ie=edge">
   <title>Wavescrollbar</title>
   <link rel="stylesheet" href="css/wavescrollbar-react.css">
</head>
<body>
   <wavescrollbar>
   </wavescrollbar-react>

   <script src="js/wavescrollbar-react.js"></script>
   <script>
      var wavescrollbar = new Wavescrollbar()
   </script>
</body>
</html>

Add the javascript and css file to make it work properly!

<!-- Import the CSS file -->
<link rel="stylesheet" href="css/wavescrollbar-react.css">

<!-- Import the javascript file -->
<script src="js/wavescrollbar-react.js"></script>

šŸ“ Features

NĀ°MethodParameter
1setAnimationNone
2setContainerBackgroundcolor
3setGradientoptions
4setBackgroundcolor
5setTransitionoptions
6setHeightvalue

šŸ“š Method setAnimation

Example:

// We instantiate the animation method
wavescrollbar.setAnimation() //It does not need parameters.

šŸ“š Method setContainerBackground

Example:

/**
 * @param color
 * */
// 
// Default-> #eeeeee
const color = "#eafbea"
wavescrollbar.setContainerBackground(color)

šŸ“š Method setGradient

Example:

/**
 * @param options: object
 * */

const options = {
   // default-> 90deg
   angle: "45deg", // 0deg - 360deg
   // Default-> ["#11998e", "#38ef7d"]
   colors: [
      "#11998e",
      "#38ef7d",
      "red",
      "blue"
   ]
}
wavescrollbar.setGradient(options)

šŸ“š Method setBackground

Example:

/**
 * @param color
 * */
// Default-> pink
const color = "red"
wavescrollbar.setBackground(color)

šŸ“š Method setTransition

Example:

/**
 * @param options
 * */

const options = {
   // Default-> .2s
   duration: "100ms",
   // Default-> 0s
   delay: '0s',
   // Default-> linear
   timing: "ease-in-out" // "linear" | "ease" | "ease-in" | "ease-in-out" | "ease-out"
}
wavescrollbar.setTransition(options)

šŸ“š Method setHeight

Example:

/**
 * @param value
 * */
// Default-> 5px
const height = "10px"
wavescrollbar.setHeight(height)

ā­ Support for

Wavescrollbar is an open source project licensed by MIT. You can grow thanks to the sponsors and the support of the amazing sponsors. If you want to join them, contact me here.

šŸŽ© Contributors

šŸŽ© Stay in touch

šŸ“œ License

Wavescrollbar is MIT licensed.