Satisfying Black Fire Cursor Trail Animation

Поділитися
Вставка
  • Опубліковано 8 лис 2024

КОМЕНТАРІ • 137

  • @vicentemoore5675
    @vicentemoore5675 Рік тому +45

    Perfect Video!! but now i can't press buttons or select text, what should I do?? Its like if the Mouse isn't working

    • @codemorphism
      @codemorphism  Рік тому +40

      By setting "pointer-events: none;" to .circle class should do the trick. Also updated codepen's CSS section, just in case you want to get an idea. Thank you for highlighting this.

    • @vicentemoore5675
      @vicentemoore5675 Рік тому +6

      @@codemorphism thanks for the quick response friend! I appreciate your content

  • @anmolsharma4049
    @anmolsharma4049 Рік тому +8

    You should have more than 150k subs. Your production quality is top notch

  • @greendsnow
    @greendsnow Рік тому +2

    Svelte made me love watching Vanilla JS content because it's so easy to apply it with it.

  • @Fight011
    @Fight011 9 місяців тому

    thank you for your work, i was searching about custom cursors on websites, but i did'nt find any of them. then i searched on yt and here i found youuuuuuuuu!

  • @aryanpinto5105
    @aryanpinto5105 Рік тому

    Thanks Man. The mouse trailer is really beautiful. Have implemented it in my portfolio. Once again thanx!!

  • @laes8564
    @laes8564 Рік тому +2

    thank you very much! Great work!

  • @eS_DOOM
    @eS_DOOM 10 місяців тому

    awesome video. clear and concise. gonna try and implement something similar to this on a project soon.

  • @dabbopabblo
    @dabbopabblo Рік тому +2

    You skipped the part where your supposed to use backdrop filter to invert whats behind it, and how would you stop it from inverting the other circles?

    • @codemorphism
      @codemorphism  Рік тому +1

      Yeah that wasn’t in scope of the video but people liked so I created that too, it was in description, please check this out: codepen.io/zainzafar/pen/KKejxQg

  • @svengunther7653
    @svengunther7653 9 місяців тому

    Thanks for sharing this. So cool!

  • @tofuboy529
    @tofuboy529 Рік тому +2

    I love it! Nice and concise tutorial too ^^

  • @voldemortvi4264
    @voldemortvi4264 Рік тому

    +1 sub , short explanation , nice music in the background & i learned few things thanks to you

  • @MariusLeica
    @MariusLeica Рік тому

    Wow! Really nice effect! Thank you for the video!

  • @rayancodes4618
    @rayancodes4618 Рік тому +2

    NICE WORK

  • @the_ere
    @the_ere 10 місяців тому

    could you possibly ever make a app or program do the same thing so it dont not only work on a website?

  • @developer_014
    @developer_014 Рік тому +1

    Great content and really simple that ur simplicity and the way you highlights little things in ur video reminded me of a similar creator, Hyperplexed. Once again great content and you have successfully won my sub!

    • @codemorphism
      @codemorphism  Рік тому +1

      this comment made my day, thank you 🙏

  • @devamrh
    @devamrh Рік тому

    Remember me dude. I subscribed😇
    BTW, this was a helpful tutorial and please make more like it.❤️❤️‍🔥

  • @eybietie
    @eybietie Рік тому

    really good video. inspirational and short. one client will soon have such a cursor :)

  • @sanskarsharma5863
    @sanskarsharma5863 Рік тому

    A quick subscription just like the video 🙌

  • @charlesxavier77
    @charlesxavier77 Рік тому

    you really need to make more video like this :D

  • @sushmithanairws
    @sushmithanairws Рік тому

    Hello! I absolutely love this and want to add this to my framer website and was wondering if you could help me out with it.

    • @codemorphism
      @codemorphism  11 місяців тому

      havent worked with framer but if it allows custom script/css and some html, you can get the link for code in description

  • @aniket_20.05
    @aniket_20.05 8 місяців тому +1

    Will it work on scrolling ?? 😢

  • @lean9875
    @lean9875 Рік тому +5

    Very nice! I made some adjustments to make it run in react, I solved a problem that I had when clicking on other elements (all the other elements of my project have z-index: 100;), anyway if it helps someone here I leave the code:
    import React, { useEffect } from 'react';
    import './style.css'
    function MouseTrail() {
    useEffect(() => {
    const circles = document.querySelectorAll('.circle');
    const coords = {
    x: 0,
    y: 0,
    };
    circles.forEach(function (circle) {
    circle.x = 0;
    circle.y = 0;
    });
    const bg = document.createElement('div');
    bg.classList.add('bg');
    document.body.appendChild(bg); // Agregamos el div bg al body
    const animatedCircles = () => {
    let x = coords.x;
    let y = coords.y;
    circles.forEach(function (circle, index) {
    circle.style.left = circle.x - 12 + "px";
    circle.style.top = circle.y - 12 + "px";
    circle.style.transform = `scale(${(circles.length - index) / circles.length})`;
    circle.x = x;
    circle.y = y;
    const nextCircle = circles[index + 1] || circles[0];
    x += (nextCircle.x - x) *0.5;
    y += (nextCircle.y - y) *0.5;
    });

    }
    window.addEventListener('mousemove', (e) => {
    coords.x = e.clientX;
    coords.y = e.clientY;
    animatedCircles();
    });
    }, [])
    return (

    {/* Agregamos el div bg en el renderizado */}











    );
    }
    export default MouseTrail;
    style.css :
    .circle{
    height: 24px;
    width: 24px;
    border-radius: 24px;
    background-color: azure;
    position: absolute;
    top: 0;
    left: 0;
    mix-blend-mode: difference;
    z-index: 0;
    }
    .bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1000;
    }

    • @lean9875
      @lean9875 Рік тому

      I have another problem, when I scroll the "Mouse Trail" it stays away from the cursor :(

    • @lean9875
      @lean9875 Рік тому +1

      Fixed, literally 🤣 style.css = .circle {
      position: fixed
      }

    • @aryanpinto5105
      @aryanpinto5105 Рік тому +1

      Thanx bro. Your code was of great help to me.

  • @aesthfex
    @aesthfex Місяць тому

    can we add a logo in centre of cursor.?

  • @rickyventaglio5811
    @rickyventaglio5811 Рік тому

    Bro, this is fantastic and exactly what I’m looking for. I’ve got a problem though. I’m using Webflow to build a site. How would I go about the injection of the code? Should I just create x amount of div blocks called ‘circle’?

    • @codemorphism
      @codemorphism  Рік тому

      I haven't worked with Webflow, but this code should work on any site that supports HTML, CSS, and JS

    • @lifeofameji
      @lifeofameji 8 місяців тому

      hey bro, were you able to get it done on webflow?

  • @itstechking
    @itstechking Рік тому

    this is the only video i found to create this king of effect thanks for helping us.but when I tryed to run this on VS code it wont do anything.how can i fix it sir? (It is not working even when i just copy it from code pen)

    • @codemorphism
      @codemorphism  Рік тому

      can you provide the link that reproduces the issue probably a sandbox link or something

    • @itstechking
      @itstechking Рік тому

      @@codemorphism unfortunatly i dont know how to do that but I can send you some screen shots of the code via Gmail is it fine?

  • @hasibur_r
    @hasibur_r Рік тому

    Hi, Awsome tutorial.
    Wanted to ask something, how can we delay the cursor following?
    because I've created another simple small cursor and wanted this trailed cursor to follow that small cursor.
    Thank you.

    • @codemorphism
      @codemorphism  11 місяців тому

      there’s .animate method that uses duration I believe and can help achieve the goal, I’ll try creating a code snippet that I can post the link for

  • @jagadeeshr1418
    @jagadeeshr1418 3 місяці тому

    can yo do the same tutorial for react

  • @digitalspsrconstructions
    @digitalspsrconstructions Рік тому +1

    what about that effect when cursor is not moving ...the effect in its static form

  • @ayochills
    @ayochills Рік тому

    Great tutorial! I noticed an issue when I tried to use it on my site, it works well initially but when I scroll further down a long page the cursor doesn't follow the mouse down the page.

    • @codemorphism
      @codemorphism  Рік тому

      Setting "position: fixed" should handle this for you, since it was tutorial on how to replicate the behaviour, I didn't account for scrolling page. Thank you for the catch.

    • @codemorphism
      @codemorphism  Рік тому

      Here's the codepen with what you are looking for: codepen.io/zainzafar/pen/abKgBNX

    • @ayochills
      @ayochills Рік тому +1

      @@codemorphism Thank you! more of these tutorials would be really appreciated.

    • @watusi1988
      @watusi1988 Рік тому

      @@codemorphism i have the same issue, position fixed doesnt solve it. what can i do?

    • @codemorphism
      @codemorphism  Рік тому

      @@watusi1988 can you share the code or at least give me reproducible version-of the code?

  • @dhaneshvijayragu
    @dhaneshvijayragu Рік тому

    Really nice video.. I wanted to implement this in react using framer-motion but the nextCircle thing is kinda difficult to do and I am clueless. Any help on how to get the next Circle's coordinates in react?

    • @codemorphism
      @codemorphism  Рік тому

      I haven’t used framer motion but should be the logic

  • @shankarpubg9413
    @shankarpubg9413 Рік тому

    Crazy one ❤

  • @vishwaschugh8845
    @vishwaschugh8845 3 місяці тому +2

    i made a website and its working on the first page or the first div but if i am scrolling the page its not following the cursor . what can be the reason and solution?

    • @shlokjadhav8804
      @shlokjadhav8804 Місяць тому

      Switch between position absolute and relative, i don't remember which is the correct one so just switch and try

    • @nosignal5908
      @nosignal5908 24 дні тому

      No give your html,body {
      overflow-x: hidden;
      }

    • @nosignal5908
      @nosignal5908 24 дні тому

      That worked for me¡

  • @TERIHAX
    @TERIHAX Рік тому

    The second hyperplexed

  • @aayushchauhan-g6t
    @aayushchauhan-g6t 10 місяців тому

    hey bro, this is soo interesting. Not working on elementor. can you please make a video for
    elementor users???

  • @hindibravenews
    @hindibravenews Рік тому

    Can you make cursor like this

  • @Andres-cc7vv
    @Andres-cc7vv Рік тому

    Thank u.

  • @Xenodinger
    @Xenodinger Рік тому

    You didn't add that inversing of colors feature when you go over items on the page, I added a few text elements and the circles were blocking me from seeing them

    • @codemorphism
      @codemorphism  Рік тому

      I wanted to but that would kill the short video purpose.

    • @Xenodinger
      @Xenodinger Рік тому

      @@codemorphism I get it, but props to you, I definitely subscribed, you’re going places man, at least your account is, because your content deserves better exposure

    • @codemorphism
      @codemorphism  Рік тому +1

      @@Xenodinger No worries. There you go with inverted colors. Codepen: codepen.io/zainzafar/pen/KKejxQg

    • @Xenodinger
      @Xenodinger Рік тому

      @@codemorphism Thank you very much, I know it will be harder for you to personally reply to comments as your channel grows, but I hope you keep up this energy

  • @saadmounaime6856
    @saadmounaime6856 Рік тому

    Perfect 👌🏼

  • @chandruloganathan3725
    @chandruloganathan3725 Рік тому

    How to use it in the react. Since I am having many components in my file I slightly confused on how to use this in react. Help me!

  • @megamind452
    @megamind452 Рік тому

    Subscribed & liked 👍

  • @Hamzahharoon
    @Hamzahharoon Рік тому +1

    Why does it perfectly work on codepen, when i apply this effect on my own html, the first circle starts to cut off and looks unpleasant please let me know if anyone knows a way around this

  • @LewraAzad
    @LewraAzad Рік тому

    Nice work dude!
    Remember to give me a thumbs up when you reach a million.

  • @chriatianngouw
    @chriatianngouw Рік тому

    more like this plsss

    • @codemorphism
      @codemorphism  Рік тому

      I have posted another video 2 days, I hope it fits the bill

  • @AwaisAli93
    @AwaisAli93 Рік тому

    It is amazing

  • @herosova
    @herosova Рік тому

    why it always happen the thing i have built 2 years ago now youtube recommends me hey see this

  • @AjayShree29
    @AjayShree29 Рік тому

    Just grt tutorials bro...i thing that i wann remove mouse arrow from circle.. i mean its works fine but circle display with arrow cursor so i wanna remove that display only circle.

    • @codemorphism
      @codemorphism  Рік тому +1

      This line (👇🏻) should get you going
      * { cursor: none; }

    • @AjayShree29
      @AjayShree29 Рік тому

      @@codemorphism thank you so much....plz keep on posting these types of content.

  • @al-ggames1269
    @al-ggames1269 Рік тому

    Do you have a video on doing this with react?

    • @Sammysapphira
      @Sammysapphira 7 місяців тому

      It's literally the exact same bro

  • @eddy3795
    @eddy3795 Рік тому

    hey i love that cursor and i wanted to use it for obs on a scene where you cant see the regular cursor, do you have a e.g. python script for that or any other way to do this?

    • @codemorphism
      @codemorphism  Рік тому

      I am sorry but I don’t get what you mean by python script for this?

    • @eddy3795
      @eddy3795 Рік тому

      @@codemorphism for obs, open broadcaster software, but doesnt have to be a script

  • @awebcode
    @awebcode Рік тому

    wow great

  • @arjayquidlat
    @arjayquidlat 11 місяців тому

    Damn I don't know why but my mouse animation moves only horizontal and not vertical :'( Help!

    • @codemorphism
      @codemorphism  11 місяців тому

      Technically it shouldn’t, are you changing both x and y?

  • @JYT-Official
    @JYT-Official Рік тому

    I'm new here and i wonna subscribe just because of your quick response bro.

  • @t.g6231
    @t.g6231 7 місяців тому

    How do I download this and make it my pc's mouse cursor trail

    • @Sammysapphira
      @Sammysapphira 7 місяців тому

      You don't. It's a web design.

  • @samuellamichhane4368
    @samuellamichhane4368 7 місяців тому

    Why does mouse scroll not work

  • @hey_im_abhi___
    @hey_im_abhi___ 5 місяців тому

    can i get the source code of this Black Fire Cursor video???

    • @codemorphism
      @codemorphism  5 місяців тому

      you can use codepen link shared in the description

  • @lenamusatov3359
    @lenamusatov3359 Рік тому

    Do you need a library for this? The .js part doesn't seem to be working with my html page, the dot stays at the upper left corner.

    • @codemorphism
      @codemorphism  Рік тому

      I have shared the link in the description, it should work out of the box, no library is required to run this

    • @lenamusatov3359
      @lenamusatov3359 Рік тому

      @@codemorphism Wouw thank you for the quick respose! I tried with the code from the description but it still doesn't seem to work. I get an error saying "uncaught type error: cannot read properties of null (reading 'style')" refering to line 47-48 in the js code.

    • @codemorphism
      @codemorphism  Рік тому

      @@lenamusatov3359 are you sure you are using the correct class names both in html and js?

    • @lenamusatov3359
      @lenamusatov3359 Рік тому +1

      @@codemorphism Omg It works now! I made a completly new file and tried again and it works now. I might have accedentally done something weird. But again thank you very much for your help and for the video! I realliy like this cursor effect, it's also so satisfying haha

  • @charlesxavier77
    @charlesxavier77 Рік тому

    very nice

  • @FourtyTwoShorts
    @FourtyTwoShorts Рік тому

    when I refresh the page then the mouse is stuck in the top

  • @bobby-k8y
    @bobby-k8y Рік тому

    does it work or is it just for the site bc im looking for a cursor and this showed up

    • @codemorphism
      @codemorphism  Рік тому

      site only ofc

    • @bobby-k8y
      @bobby-k8y Рік тому

      @@codemorphism sorry bc my friend send it wasnt site only

  • @watusi1988
    @watusi1988 Рік тому

    hi! I have a bug, that when i scroll down in the website, the default mouse and the animated mouse are separated, how can i fix that?

    • @watusi1988
      @watusi1988 Рік тому +2

      I have resolved issue using pageX and pageY insted of clientX and clientY.

    • @codemorphism
      @codemorphism  Рік тому

      thanks for updating

  • @0lange
    @0lange Рік тому

    How would you implrmrnt this in react?

    • @codemorphism
      @codemorphism  Рік тому

      Not that I can’t implement but have you tried asking Chat GPT?
      As the logic remains the same it’s just a library change

    • @0lange
      @0lange Рік тому +1

      @@codemorphism I figured it out :)

  • @coderizer
    @coderizer Рік тому

    looks so fun working on this kinda project

  • @djon.petitjean
    @djon.petitjean Рік тому

    Can it be add to wordpress elementor ?

    • @codemorphism
      @codemorphism  Рік тому

      haven’t played with elementor, PS its vanilla JS and CSS if elementor allows that you to do that should be fine so you’ll have to try it out yourself

    • @djon.petitjean
      @djon.petitjean Рік тому

      @@codemorphism ok i will try thanks

  • @kushaljaindance2414
    @kushaljaindance2414 Рік тому

    What's that software

    • @codemorphism
      @codemorphism  Рік тому

      What do you mean by whats that software? Are you talking about codepen.io

  • @xyzshoaib3759
    @xyzshoaib3759 Рік тому

    It is not working on my html file (vs code)?

    • @codemorphism
      @codemorphism  Рік тому

      You can checkout the codepen link shared in the description

    • @xyzshoaib3759
      @xyzshoaib3759 Рік тому

      yes I seen it but dosent work please help me sir @@codemorphism 😢

  • @bogdan_golubovic
    @bogdan_golubovic Рік тому +1

    100 subs :)

  • @bobby-k8y
    @bobby-k8y Рік тому

    if it does work how do i get it bc i have the zip

    • @codemorphism
      @codemorphism  Рік тому

      what do you mean you have a zip? I am not following

    • @bobby-k8y
      @bobby-k8y Рік тому

      @@codemorphism i mean is it possible to apply it to actual pc

  • @exouw
    @exouw Рік тому

    it's not working for me at all =( but i'm not good at coding

    • @codemorphism
      @codemorphism  Рік тому

      check this link: codepen.io/zainzafar/pen/abKgBNX and try following tutorial with detail code in the link

  • @one00000
    @one00000 10 місяців тому

    ua-cam.com/video/DcUGqBXGaN4/v-deo.html
    How can this mouse run in the background?

    • @codemorphism
      @codemorphism  10 місяців тому

      that’s a desktop app but can be achieved via WebGL in web as well

  • @ezkymos
    @ezkymos Рік тому

    Your outro content hide the final code you edited 👎

    • @codemorphism
      @codemorphism  Рік тому

      I have completely removed the outro, thanks for pointing it out