Giter Site home page Giter Site logo

codrops / magneticbuttons Goto Github PK

View Code? Open in Web Editor NEW
468.0 11.0 91.0 499 KB

A set of buttons with a magnetic interaction and a hover effect.

Home Page: https://tympanus.net/codrops/?p=50513

License: MIT License

CSS 19.63% HTML 25.04% JavaScript 55.33%
button-animation

magneticbuttons's Introduction

Magnetic Buttons

A small set of magnetic buttons with some fun hover animations. Inspired by the button animation seen on Cuberto.

Image

Article on Codrops

Demo

Installation

Install dependencies:

npm install

Compile the code for development and start a local server:

npm start

Create the build:

npm run build

Misc

Follow Codrops: Twitter, Facebook, GitHub, Instagram

License

MIT

Made with πŸ’™ by Codrops

magneticbuttons's People

Contributors

botelho avatar crnacura avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

magneticbuttons's Issues

page reload issue

Hello! Faced a problem, when reloading a page in google chrome, the hover zone moves somewhere to the top of the page. The effect starts working normally again if you scroll to the top of the page and reload. I don’t see any point in attaching the code, I used your files and connected the demo4.e22d7780.js file to the project. I checked for conflicts with other files - I found nothing. In all other browsers, everything works as it should. Please tell me what this problem may be related to, what I did wrong.

Wrong effect position

Hello, i was testing the index"1" when i face this issue:
i put about 70 span between the header closure and button start(to make the page higher than the screen) and others 30 below the button closure.
The problem is that now the magnetic effect no longer starts from the position of the button but a little higher even if I reload the page.

More than one

Hi there and first of all congrats for your amazing job.
I've been playing around with these magnetic buttons and I am wondering if is it possible to add more than only one on the same HTML, I've been trying it with no luck. could you point us to the right direction to achieve that?

Thanks heaps

Does not detect multiple buttons

Hello.
When the html button is duplicated and placed elsewhere in the html code, it doesn't work because it only detects one. The code is not prepared to have multiple buttons in the same html. How do I implement that? I think it would be a nice improvement.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.