How To Make Toggle Button Using HTML & CSS

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 ก.พ. 2025

ความคิดเห็น • 63

  • @tanjirnu
    @tanjirnu 11 หลายเดือนก่อน +5

    Sir,
    we are with you . keep doing what are you doing.......

  • @matsang2008
    @matsang2008 ปีที่แล้ว +8

    Nice. You made it so easy. No more blah blah and straight forward. Thanks

    • @Maketechstuffs
      @Maketechstuffs  9 หลายเดือนก่อน +1

      Your welcome

    • @Nexaman18
      @Nexaman18 8 หลายเดือนก่อน

      @@Maketechstuffs L easy bruuuh no explation just copy paste

  • @さかな-o6l
    @さかな-o6l 6 หลายเดือนก่อน +1

    wow, simple but I would never figure out how to make this by myself hahaha Thank you!

  • @dynashiftgaming2861
    @dynashiftgaming2861 ปีที่แล้ว +4

    full support man. 🖤

  • @jvenkatonline
    @jvenkatonline 9 หลายเดือนก่อน

    Simple and clear. I have seen multiple tutorials for this functionality, but this is very simple and easy-to-understand logic without any extra steps. Thanks.👍

    • @Maketechstuffs
      @Maketechstuffs  9 หลายเดือนก่อน

      Your welcome

    • @jvenkatonline
      @jvenkatonline 9 หลายเดือนก่อน

      @@Maketechstuffs particularly you keep the checkbox till the last minute. finally, you hide it (display: none). I like that approach. without any explanation, I could understand what you were doing.

  • @introvert456
    @introvert456 ปีที่แล้ว +11

    You could easily make it by embedding online icons , but it was a fun that you totally made it by yourself ❤️

    • @d.s.h6629
      @d.s.h6629 ปีที่แล้ว

      do you mean icons

    • @introvert456
      @introvert456 ปีที่แล้ว +1

      @@d.s.h6629 oh sorry i wrote fonts by mistake

    • @S-Lomar
      @S-Lomar ปีที่แล้ว

      😍😍😍😍😍😍😍😍😍😍😍😍😍😍😍

    • @S-Lomar
      @S-Lomar ปีที่แล้ว

      😂😂😂😂😂😂😂😂😂😂😂😂😂😂

    • @introvert456
      @introvert456 ปีที่แล้ว

      @@S-Lomar waddup?

  • @S-Lomar
    @S-Lomar ปีที่แล้ว +3

    This guy is the best 😍😍🥰🥰🥰😍🤣😂😂🤪🤪🤪😂😂😂😂

    • @gbbarn
      @gbbarn 8 หลายเดือนก่อน

      Yeah, thanks chatGPT lol.

  • @liuv5972
    @liuv5972 2 หลายเดือนก่อน

    omg thank you sm

  • @BlueAngleYt
    @BlueAngleYt ปีที่แล้ว +1

    Amazing

  • @manashkamaldey520
    @manashkamaldey520 ปีที่แล้ว +2

    good

  • @amandacolares7501
    @amandacolares7501 ปีที่แล้ว +1

    great tutorial

  • @edrisssafi5796
    @edrisssafi5796 8 หลายเดือนก่อน

    Very nice

  • @chrisazuaje892
    @chrisazuaje892 ปีที่แล้ว +1

    Great video!

  • @HariBalaKumarR.V
    @HariBalaKumarR.V 8 หลายเดือนก่อน

    Sir,I am newly learning html and css may I please know a proper road map(if you could provide) on how to master html and css or where to start and to end..

    • @Maketechstuffs
      @Maketechstuffs  8 หลายเดือนก่อน

      You can learn from many websites. (One name is w3schools.com).
      Important thing is you have to practise. By creating different forms, web page, websites, etc. Then you'll get the idea of designing.
      Means
      how i can make this element this side or that side.
      How i can make this element below another element.
      How can i make this element appear in the centre.
      How can i add border on the top and bottom of this element.
      How can i show this elements side by side or in a line, or in a row.
      How can i add bullet points in the list items.
      How can i make the extra elements to appear from second line if first line is full.
      , Etc.

  • @0xGrowth
    @0xGrowth 9 หลายเดือนก่อน

    What VsCode extension are you using that reflects the changes you're making to the code directly on the webpage?

  • @S-Lomar
    @S-Lomar ปีที่แล้ว +1

    Well done 🥰🥰🥰🥰🥰😍🥰🥰🥰🥰🥰🥰😍🥰👍👍🥰🥰🥰🥰🥰🥰🥰😍🥰🥰🥰🥰🥰

  • @ravimakwana992
    @ravimakwana992 4 หลายเดือนก่อน

    crazy

  • @HushCode
    @HushCode ปีที่แล้ว

    Sympa 👍

  • @sarahpires2251
    @sarahpires2251 10 หลายเดือนก่อน

    Perfect

  • @realjonav
    @realjonav ปีที่แล้ว +2

    hey! could you help me turn this into a darkmode button?

    • @Maketechstuffs
      @Maketechstuffs  ปีที่แล้ว

      You can add text(dark and loght mode) in front of toggle button and use this button as dark and light mode switch. And you can change design little bit.

    • @realjonav
      @realjonav ปีที่แล้ว

      @@Maketechstuffs i was asking if you knew how to actually make the button do a toggle where it would actually change the site to dark mode?

    • @Maketechstuffs
      @Maketechstuffs  ปีที่แล้ว +1

      Ok I'll make video on it.

    • @realjonav
      @realjonav ปีที่แล้ว

      @@Maketechstuffs okay i’ll be waiting! :)

    • @Arman-df4wo
      @Arman-df4wo 10 หลายเดือนก่อน

      ​@@realjonav what you can do is add a event listener to that checkbox [event "change"] inside that a callback function this will check if this checked box is checked or not if checked add a class to body where all the colours for dark mode are described

  • @priyadharshinis6039
    @priyadharshinis6039 ปีที่แล้ว +1

    How to set its button on the right corner please respond me

    • @Maketechstuffs
      @Maketechstuffs  ปีที่แล้ว

      Just replace the container class css
      .container{
      background-color: #fff;
      display: flex;
      float: right;
      }

  • @mikhaildolgov
    @mikhaildolgov ปีที่แล้ว +2

    👍

  • @krstev29
    @krstev29 ปีที่แล้ว +1

    I just don't know why when I click on the button nothing happens, i need to hide the checkbox behind the button so if works, I think

    • @Maketechstuffs
      @Maketechstuffs  ปีที่แล้ว +1

      No it won't works.
      If you hide checkbox behind button then how you click checkbox. It possible when you set pointer event none to button. But then also it only works when you click on checkbox and its too small to not visible (as it behind the button).
      Thats why here used label tag once checkbox bind with button. Now you can place checkbox anywhere in page or even hide it.
      Now when you click on checkbox or button is equal to click on button(label) and checkbox.
      You'll find more information on website (search toggle on website).

    • @russellpawlett3564
      @russellpawlett3564 ปีที่แล้ว

      I had the same issue, I missed a step in the instructions . Make sure in the container you have
      -- I missed the id="check" which made the button not transition if clicked on

    • @Rudymaze
      @Rudymaze ปีที่แล้ว

      hi guy i have all these in place but still no transition
      @@russellpawlett3564

  • @chrystnx
    @chrystnx ปีที่แล้ว +1

    lindo

  • @NadeemJohn-xu4lu
    @NadeemJohn-xu4lu ปีที่แล้ว +1

    NADEEMJOHN

  • @namesare4fools
    @namesare4fools ปีที่แล้ว +2

    trust me, if your priority is to build a product just use component library

    • @jeloxjdm8298
      @jeloxjdm8298 ปีที่แล้ว +4

      Backend engineer be like:

  • @ilTHfeaa
    @ilTHfeaa 9 หลายเดือนก่อน

    this doesn’t work if there’s multiple though

  • @oquangtai6889
    @oquangtai6889 ปีที่แล้ว +1

    how can i use this button after coding it done?

    • @Maketechstuffs
      @Maketechstuffs  ปีที่แล้ว

      You can use it as switch (dark and light mode, to on/off something, show & hide something etc... )
      you can use as setting in your software. For example if button is ON show something, if button is OFF hide something.
      Use as autosave functionality. if button is ON (checkbox is checked) autosave enable, if OFF(checkbox is unchecked) autosave disable. And in many other ways you can use.

    • @Maketechstuffs
      @Maketechstuffs  ปีที่แล้ว

      Yes! you can make toggle button functional with js.

  • @menephyl007
    @menephyl007 11 หลายเดือนก่อน

    wholl

  • @Luis-VZ
    @Luis-VZ ปีที่แล้ว +2

    good

  • @NadeemJohn-xu4lu
    @NadeemJohn-xu4lu ปีที่แล้ว

    NADEEMJOHN