Button Ripple Effect - VanillaJS

Size
3,095 Kb
Views
22,264

How do I make an button ripple effect - vanillajs?

Works in mobile too ;). What is a button ripple effect - vanillajs? How do you make a button ripple effect - vanillajs? This script and codes were developed by Tommaso Poletti on 14 October 2022, Friday.

Button Ripple Effect - VanillaJS Previews

Button Ripple Effect - VanillaJS - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Button Ripple Effect - VanillaJS</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <!--	If u want to use in your project	the only things to do is to add:	data-animation="ripple"	in the elements you want ;)
-->
<div class="container">	<a data-animation="ripple">Click Me</a>
</div> <script src="js/index.js"></script>
</body>
</html>

Button Ripple Effect - VanillaJS - Script Codes CSS Codes

:root {	/* if u want to change the color of * the ripple change this value	*/	--color-ripple: rgba(255,255,255,0.8);
}
body {	background: #36353c;
}
.container {	position: absolute;	top: 0;	left: 0;	right: 0;	bottom: 0;	height: 50px;	width: 200px;	margin: auto;
}
*[data-animation="ripple"] {	position: relative; /*Position relative is required*/	height: 100%;	width: 100%;	display: block;	outline: none;	padding: 20px;	color: #fff;	text-transform: uppercase;	background: linear-gradient(135deg, #e570e7 0%,#79f1fc 100%);	box-sizing: border-box;	text-align: center;	line-height: 14px;	font-family: roboto, helvetica;	font-weight: 200;	letter-spacing: 1px;	text-decoration: none;	box-shadow: 0 5px 3px rgba(0, 0, 0, 0.3);	cursor: pointer; /*border-radius: 50px;*/	-webkit-tap-highlight-color: transparent;
}
*[data-animation="ripple"]:focus {	outline: none;
}
*[data-animation="ripple"]::selection {	background: transparent;	pointer-events: none;
}

Button Ripple Effect - VanillaJS - Script Codes JS Codes

/* * If u want integrate that, i've create a library for use ripple in your * beautifoul projects 
Button Ripple Effect - VanillaJS - Script Codes
Button Ripple Effect - VanillaJS - Script Codes
Home Page Home
Developer Tommaso Poletti
Username tomma5o
Uploaded October 14, 2022
Rating 4.5
Size 3,095 Kb
Views 22,264
Do you need developer help for Button Ripple Effect - VanillaJS?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Tommaso Poletti (tomma5o) Script Codes
Create amazing blog posts with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!