MagneticButtons: These buttons are magnetic and follow the mouse pointer when the pointer hovers over it. These buttons are used in web pages for various UI purposes.
Note: Please download the JavaScript based MagneticButtons plugin and keep them in your working folder and include the relevant files in the head section of your HTML code as shown below in the examples.
<link href=”https://use.typekit.net/jpv1bvw.css” rel=”stylesheet” type=”text/css”/>
<link href=”base.98fd6c19.css” rel=”stylesheet” type=”text/css”/>
<link href=”button.f89f9832.css” rel=”stylesheet” type=”text/css”/>
<script src=”demo.9ce5c2ea.js”></script>
<script src=” demo1.151408fb.js”></script>
Example 1:
| <!DOCTYPE html> <htmllang="en"class="no-js">  <head>     <metacharset="UTF-8">     <metaname="viewport"content=         "width=device-width, initial-scale=1">      <linkrel="stylesheet"href="     <linkrel="stylesheet"type="text/css"href="         base.98fd6c19.css">     <linkrel="stylesheet"type="text/css"href="         button.f89f9832.css"> </head>  <bodyclass="demo-1">     <main>         <divclass="content">             <buttonclass="button">                 <spanclass="button__text">                     <spanclass=                         "button__text-inner">                         Click                     </span>                 </span>             </button>         </div>         <navclass="demos">             <ahref="index.html"class=                 "demo demo--current"aria-label="">             </a>         </nav>     </main>     <svgclass="cursor"width="25"        height="25"viewBox="0 0 25 25">         <circleclass="cursor__inner"            cx="12.5"cy="12.5"r="6.25">         </circle>     </svg>     <scriptsrc="demo.9ce5c2ea.js"></script>     <scriptsrc="demo1.151408fb.js"></script> </body>  </html>  | 
Output:
Example 2: Please include the following files in your code for its working.
<link href=”button.5d2fdfe7.css” rel=”stylesheet” type=”text/css”/>
<script src=”demo2.44794d1a.js”></script>
| <!DOCTYPE html> <htmllang="en"class="no-js">  <head>     <metacharset="UTF-8">     <metaname="viewport"content="         width=device-width, initial-scale=1">      <linkrel="stylesheet"href="     <linkrel="stylesheet"type="text/css"href="         button.5d2fdfe7.css">     <linkrel="stylesheet"type="text/css"href="         base.98fd6c19.css"> </head>  <bodyclass="demo-2">     <main>         <divclass="content">             <buttonclass="button">                 <divclass="button__deco">                     <divclass=                         "button__deco-filler">                     </div>                 </div>                 <spanclass="button__text">                     <spanclass=                         "button__text-inner">                         Enter                     </span>                 </span>             </button>         </div>         <navclass="demos">             <ahref="myindex2.html"                class="demo demo--current"                aria-label="">             </a>         </nav>     </main>     <svgclass="cursor"width="25"        height="25"viewBox="0 0 25 25">         <circleclass="cursor__inner"            cx="12.5"cy="12.5"r="6.25">         </circle>     </svg>     <scriptsrc="demo2.44794d1a.js"></script>     <scriptsrc="demo.9ce5c2ea.js"></script>  </body>  </html>  | 
Output:
Example 3: Please include the following files.
<link href=”button.93b3ed9d.css” rel=”stylesheet”
<script src=”demo3.b516845c.js”></script>
| <!DOCTYPE html> <htmllang="en"class="no-js">  <head>     <metacharset="UTF-8">     <metaname="viewport"content="         width=device-width, initial-scale=1">      <linkrel="stylesheet"href="     <linkrel="stylesheet"type="text/css"href="         button.93b3ed9d.css">     <linkrel="stylesheet"type="text/css"href="         base.98fd6c19.css"> </head>  <bodyclass="demo-3">     <main>         <divclass="content">             <buttonclass="button">                 <spanclass="button__text">                     <spanclass=                     "button__text-inner">                     Plz Confirm                     </span>                 </span>             </button>         </div>         <navclass="demos">             <ahref="index3.html"                class="demo demo--current"                aria-label="Demo 3">             </a>         </nav>     </main>     <svgclass="cursor"width="25"        height="25"viewBox="0 0 25 25">         <circleclass="cursor__inner"            cx="12.5"cy="12.5"r="6.25">         </circle>     </svg>     <scriptsrc="demo3.b516845c.js"></script>     <scriptsrc="demo.9ce5c2ea.js"></script> </body>  </html>  | 
Output:
Example 4: Please include the following files.
<link href=”button.9ccad82e.css” rel=”stylesheet”
type=”text/css”/>
<script src=”demo4.e22d7780.js”></script>
| <!DOCTYPE html> <htmllang="en"class="no-js">  <head>     <metacharset="UTF-8">     <metaname="viewport"content="         width=device-width, initial-scale=1">      <linkrel="stylesheet"href="     <linkrel="stylesheet"type="text/css"href="         base.98fd6c19.css">     <linkrel="stylesheet"type="text/css"href="         button.9ccad82e.css">  </head>  <bodyclass="demo-4">     <main>         <divclass="content">             <buttonclass="button">                 <divclass="button__filler"></div>                 <spanclass="button__text">                     <spanclass=                         "button__text-inner">                         Watch                     </span>                 </span>             </button>         </div>         <navclass="demos">             <ahref="myindex4.html"                class="demo demo--current"                aria-label="">             </a>         </nav>     </main>     <svgclass="cursor"width="25"        height="25"viewBox="0 0 25 25">         <circleclass="cursor__inner"            cx="12.5"cy="12.5"r="6.25">         </circle>     </svg>     <scriptsrc="demo4.e22d7780.js"></script>     <scriptsrc="demo.9ce5c2ea.js"></script> </body>  </html>  | 
Output:
Example 5: Please include the following files.
<link href=”button.b160bf58.css” rel=”stylesheet”
type=”text/css”/>
<script src=”demo5.c1b42ce3.js”></script>
| <!DOCTYPE html> <htmllang="en"class="no-js">  <head>     <metacharset="UTF-8">     <metaname="viewport"content="         width=device-width, initial-scale=1">      <linkrel="stylesheet"type="text/css"        href="button.b160bf58.css">     <linkrel="stylesheet"type="text/css"        href="base.98fd6c19.css">     <linkrel="stylesheet"href=" </head>  <bodyclass="demo-2">     <main>         <divclass="content">             <buttonclass="button">                 <divclass="button__deco                      button__deco--2">                 </div>                 <divclass="button__deco                      button__deco--1">                 </div>                 <spanclass="button__text">                     <spanclass=                         "button__text-inner">                         start                     </span>                 </span>             </button>         </div>         <navclass="demos">             <ahref="index5.html"                class="demo demo--current"                aria-label="">             </a>         </nav>     </main>     <svgclass="cursor"width="25"        height="25"viewBox="0 0 25 25">         <circleclass="cursor__inner"            cx="12.5"cy="12.5"r="6.25">         </circle>     </svg>     <scriptsrc="demo5.c1b42ce3.js"></script>     <scriptsrc="demo.9ce5c2ea.js"></script> </body>  </html>  | 
Output:
Example 6: Please include the following files.
<link href=”button.bc1eb4ce.css” rel=”stylesheet”
type=”text/css”/>
<script src=”demo6.a93520db.js”></script>
| <!DOCTYPE html> <htmllang="en"class="no-js">  <head>     <metacharset="UTF-8">     <metaname="viewport"content="         width=device-width, initial-scale=1">      <linkrel="stylesheet"type="text/css"href="         button.bc1eb4ce.css">     <linkrel="stylesheet"href="     <linkrel="stylesheet"type="text/css"href="         base.98fd6c19.css"> </head>  <bodyclass="demo-4">     <main>         <divclass="content">             <divclass="button-wrap">                 <buttonclass="button">                     <divclass="button__deco"></div>                     <spanclass="button__text">                         <spanclass=                             "button__text-inner">                             Explore                         </span>                     </span>                 </button>             </div>         </div>         <navclass="demos">             <ahref="index6.html"                class="demo demo--current"                aria-label=""></a>         </nav>     </main>     <svgclass="cursor"width="25"        height="25"viewBox="0 0 25 25">         <circleclass="cursor__inner"            cx="12.5"cy="12.5"r="6.25">         </circle>     </svg>     <scriptsrc="demo6.a93520db.js"></script>     <scriptsrc="demo.9ce5c2ea.js"></script> </body>  </html>  | 
Output:


 
                                    








