How To Make Toggle Button Using HTML & CSS

  Переглядів 57,982

MakeTechStuff

MakeTechStuff

Рік тому

In this video i show you how to make a toggle button with checkbox using html & css. Or you can say in this video we are going to design checkbox or making custom checkbox.
For source code visit 👇 :
www.maketechstuff.com/
You may have to search on website ('toggle button').
______________________________
Related Videos :
Toggle button for dark and light mode.
• Dark and Light Mode To...
Animated toggle button.
• Toggle Switch Using HT...
Website with dark and light mode.
• How To Create Website ...
Custom rounded checkbox
• How To Create Custom C...
Sidebar menu close and hide using only html and css
• Sidebar Menu using onl...

КОМЕНТАРІ: 55
@tanjirnu
@tanjirnu Місяць тому
Sir, we are with you . keep doing what are you doing.......
@dynashiftgaming2861
@dynashiftgaming2861 5 місяців тому
full support man. 🖤
@LuisVZMusic
@LuisVZMusic Рік тому
good
@matsang2008
@matsang2008 4 місяці тому
Nice. You made it so easy. No more blah blah and straight forward. Thanks
@Maketechstuffs
@Maketechstuffs 14 днів тому
Your welcome
@BlueAngleYt
@BlueAngleYt 3 місяці тому
Amazing
@S-Lomar
@S-Lomar 7 місяців тому
This guy is the best 😍😍🥰🥰🥰😍🤣😂😂🤪🤪🤪😂😂😂😂
@jvenkatonline
@jvenkatonline 14 днів тому
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 14 днів тому
Your welcome
@jvenkatonline
@jvenkatonline 14 днів тому
@@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.
@S-Lomar
@S-Lomar 7 місяців тому
Well done 🥰🥰🥰🥰🥰😍🥰🥰🥰🥰🥰🥰😍🥰👍👍🥰🥰🥰🥰🥰🥰🥰😍🥰🥰🥰🥰🥰
@amandacolares7501
@amandacolares7501 9 місяців тому
great tutorial
@Maketechstuffs
@Maketechstuffs 9 місяців тому
Glad you think so!
@sarahpires2251
@sarahpires2251 18 днів тому
Perfect
@0xGrowth
@0xGrowth 4 дні тому
What VsCode extension are you using that reflects the changes you're making to the code directly on the webpage?
@chrisazuaje892
@chrisazuaje892 9 місяців тому
Great video!
@Maketechstuffs
@Maketechstuffs 9 місяців тому
Thanks!
@HushCode
@HushCode 2 місяці тому
Sympa 👍
@mikhaildolgov
@mikhaildolgov Рік тому
👍
@5ki2o
@5ki2o 2 місяці тому
Keyboard support?
@chrystnx
@chrystnx 10 місяців тому
lindo
@introvert456
@introvert456 Рік тому
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 Рік тому
@@d.s.h6629 oh sorry i wrote fonts by mistake
@S-Lomar
@S-Lomar 7 місяців тому
😍😍😍😍😍😍😍😍😍😍😍😍😍😍😍
@S-Lomar
@S-Lomar 7 місяців тому
😂😂😂😂😂😂😂😂😂😂😂😂😂😂
@introvert456
@introvert456 7 місяців тому
@@S-Lomar waddup?
@priyadharshinis6039
@priyadharshinis6039 11 місяців тому
How to set its button on the right corner please respond me
@Maketechstuffs
@Maketechstuffs 11 місяців тому
Just replace the container class css .container{ background-color: #fff; display: flex; float: right; }
@namesare4fools
@namesare4fools Рік тому
trust me, if your priority is to build a product just use component library
@jeloxjdm8298
@jeloxjdm8298 Рік тому
Backend engineer be like:
@NadeemJohn-xu4lu
@NadeemJohn-xu4lu 5 місяців тому
NADEEMJOHN
@krstev29
@krstev29 10 місяців тому
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 10 місяців тому
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 6 місяців тому
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 6 місяців тому
hi guy i have all these in place but still no transition @@russellpawlett3564
@realjonav
@realjonav 11 місяців тому
hey! could you help me turn this into a darkmode button?
@Maketechstuffs
@Maketechstuffs 11 місяців тому
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 11 місяців тому
@@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 11 місяців тому
Ok I'll make video on it.
@realjonav
@realjonav 11 місяців тому
@@Maketechstuffs okay i’ll be waiting! :)
@Arman-df4wo
@Arman-df4wo 28 днів тому
​@@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
@menephyl007
@menephyl007 2 місяці тому
wholl
@ilTHfeaa
@ilTHfeaa 8 днів тому
this doesn’t work if there’s multiple though
@Maketechstuffs
@Maketechstuffs 8 днів тому
It works.
@oquangtai6889
@oquangtai6889 Рік тому
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 9 місяців тому
Yes! you can make toggle button functional with js.
@manashkamaldey520
@manashkamaldey520 Рік тому
good
@Maketechstuffs
@Maketechstuffs Рік тому
Thanks
@NadeemJohn-xu4lu
@NadeemJohn-xu4lu 5 місяців тому
NADEEMJOHN
Top 10 CSS One Liners That Will Blow Your Mind
13:34
developedbyed
Переглядів 863 тис.
ВЫШИБАЛЫ - Сатир, Янчик, Джарахов, Миша, Антон Форсаж
1:09:04
I PUT MY ARMOR ON (Creeper) (PG Version)
00:19
Sam Green
Переглядів 3,1 млн
How to make a website light/dark toggle with CSS & JS
16:48
Kevin Powell
Переглядів 115 тис.
CSS Tips And Tricks I Wish I Knew Before
12:12
Lama Dev
Переглядів 379 тис.
Why Some Designs Are Impossible to Improve: Quintessence
33:03
Design Theory
Переглядів 53 тис.
Subtle, yet Beautiful Scroll Animations
5:04
Beyond Fireship
Переглядів 1,5 млн
Can I Create Accessible CSS Toggle Buttons?
24:14
Web Dev Simplified
Переглядів 242 тис.
Use these instead of vh
6:06
Kevin Powell
Переглядів 422 тис.
Login Form in HTML & CSS
11:07
Codehal
Переглядів 1 млн
ВЫШИБАЛЫ - Сатир, Янчик, Джарахов, Миша, Антон Форсаж
1:09:04