Everything you didn't know you need to know about buttons

Everything you didn't know you need to know about buttons

Steve (Builder.io)

1 год назад

31,935 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@WabuhWabuh
@WabuhWabuh - 04.01.2024 04:24

if you wanted to just teach html, dont put it in javascript...

Ответить
@anuvette
@anuvette - 29.11.2023 08:05

not knowing button is type submit by default gave me so much headache

Ответить
@nurhamsah_tech
@nurhamsah_tech - 17.06.2023 10:18

Wow,
thanks man 👍👍

Ответить
@6644guilherme
@6644guilherme - 27.05.2023 15:24

I like the part where he says "type equals butt..."

Ответить
@aPinix
@aPinix - 07.05.2023 18:47

I already knew this but learned it the hard way unfortunately. Thank you for for evangelizing this knowledge for everyone. Cheers!

Ответить
@uscjake868
@uscjake868 - 22.04.2023 15:14

Outstanding. I love the style of demonstrating the good and the bad. You saved a lot of trial and error.

Ответить
@nicolasguillenc
@nicolasguillenc - 14.03.2023 03:24

Literally amazing man. One of the best tutorials I've ever seen. It's humbling because who thinks about buttons twice? But there's so mucho to know

Ответить
@ricko13
@ricko13 - 11.03.2023 13:22

what if you add role="button" to an anchor tag?

Ответить
@ricko13
@ricko13 - 11.03.2023 13:18

💪

Ответить
@toby_cm
@toby_cm - 05.03.2023 02:09

Can you add back the subtitles like before? I really appreciate them

Ответить
@JenilCalcuttawala
@JenilCalcuttawala - 01.03.2023 14:27

Great video! 👏

Ответить
@kittyrah2800
@kittyrah2800 - 27.02.2023 16:23

Why not use <Nav> ?

Ответить
@TheBaca91
@TheBaca91 - 25.02.2023 06:02

I think that this kind of merge of buttons and link are not good mainly because it blurs distinctions between these two tags. In real designing scenarios there should be clear styling diference between how button and how link looks like so user know what to expect. If its button it will perform some kind of action, as for link it expects routing behaviour. So in your case you would need to pass variant to your merge button. But that button variant could be applied on both elements wich will cause undesired styles for one. It is much more clear to have buttons separetad from links since in its nature they are not same html tags. Besides it would be weird from dev perspective to see button with hrf atribute. We should keep our code ease to read

Ответить
@user-lm5ju8nc2t
@user-lm5ju8nc2t - 25.02.2023 00:03

Nice! That was helpful, man!

Ответить
@catalinim4227
@catalinim4227 - 19.02.2023 01:18

who the fuck uses a div as a button

Ответить
@frontend_ko
@frontend_ko - 18.02.2023 01:59

Nice frontend tip

Ответить
@berightben8318
@berightben8318 - 17.02.2023 16:08

Quality, pure quality. Subscribe

Ответить
@cotneit
@cotneit - 17.02.2023 00:17

all: unset blew my mind, can't believe this is the first time I'm hearing about it

Ответить
@mervinmarias9283
@mervinmarias9283 - 15.02.2023 16:59

Was watching your video and was whole time thinking, "why not just make it a web component?". Then you actually did exactly as I thought lol.

Ответить
@mfkfawas5157
@mfkfawas5157 - 11.02.2023 22:28

Amazing

Ответить
@mohamedcherif9878
@mohamedcherif9878 - 11.02.2023 15:46

I learned something new today thank you

Ответить
@tariksohan8993
@tariksohan8993 - 08.02.2023 14:53

Simple with good explanation. My favourite kinda Ytber.

Ответить
@shutdow88
@shutdow88 - 08.02.2023 14:34

Great content, as all other channel videos

...so no need for the clickbait face expression in thumbnails 😜

Ответить
@termisher5676
@termisher5676 - 08.02.2023 09:38

Bruh
Now we have problem
Now that is not working
Now this is broken.
Why do you touch it let it be.

Ответить
@loia5tqd001
@loia5tqd001 - 07.02.2023 08:52

Love this so much ❤ all the details people usually overlook or don’t talk about

Ответить
@TheVralapa
@TheVralapa - 06.02.2023 20:19

Prefer outline-color:transparent; over outline:none; better for high contrast themes.

Ответить
@Biowulf21
@Biowulf21 - 06.02.2023 11:33

Looks like I have a new channel to binge

Ответить
@ShaharHarshuv
@ShaharHarshuv - 05.02.2023 07:31

Do people actually still use the native submit functionality?

Ответить
@thedigitalceo
@thedigitalceo - 04.02.2023 18:02

This was great Steve. Thank you 🙏🏼 I think for things with anchor tags we should probably use buttons for accessibility purposes. I love the one component you showed to render the consistent button!! Although our designers tend to have a few button variations so would be good to see that as well. Would love to have you on my channel for a collab once. Thank you again!

Ответить
@JeyPeyy
@JeyPeyy - 04.02.2023 14:14

A lot of these things are easy to forget when you're in a hurry, which is why a11y plugins for eslint and stylelint are essential to me. Let's build a more accessible web together!

Ответить
@joostschuur
@joostschuur - 04.02.2023 09:26

I hate that I learned so much about buttons from this video. Thanks, Steve. I hope you're happy.

Also, keep up the good work 😊

Ответить
@kingl5519
@kingl5519 - 04.02.2023 02:18

Subscribed.

Ответить
@mahadevovnl
@mahadevovnl - 03.02.2023 22:18

If I see one more job application project where people NEST a <button> and an <a> I'll cry. W3C standards exist for many reasons. Mixing conflicting interactive elements makes my brain hurt.

Ответить
@JEsterCW
@JEsterCW - 03.02.2023 14:36

Holy sheee, this is quality content. I have watched few of ur shorts before, but after this video i was 100% sure i wanna follow u constantly.

Ответить
@Unc3
@Unc3 - 03.02.2023 13:30

if (event.key === Space || Enter) is borked logic. Just saying

Ответить
@yuryitikhonoff9631
@yuryitikhonoff9631 - 03.02.2023 13:30

OMG. It's a gem. So concise and meaningful. Thanks a lot to the author.

Ответить
@kenfrostyypaws9113
@kenfrostyypaws9113 - 03.02.2023 07:15

You're absolutely nailing this format my guy. Keep em coming!

Ответить
@amitse
@amitse - 02.02.2023 23:06

Another discussion is on button disabled state and the color contrast debate around it.

Another thing to remember you can’t disable links. All you can do is to hide them.

Ответить
@hnccox
@hnccox - 02.02.2023 14:31

That MyButton component is actually really nice! Never thought of that. My rule of thumb is that a button is for interaction for things that happen on the current page only, anchor tags are for navigation only.

Ответить
@youngnwadike5312
@youngnwadike5312 - 02.02.2023 14:19

I love this, thanks Steve

Ответить
@SushilKumar-ig8ls
@SushilKumar-ig8ls - 02.02.2023 11:01

Great unknowns to know for me 😀 Thanks a lot for these tricks

Ответить
@Nodsaibot
@Nodsaibot - 02.02.2023 10:33

lol F accessibility use your div my man

Ответить
@8koi245
@8koi245 - 02.02.2023 09:25

The style of the code and browser window is LOVELY

Ответить
@ivankraev4264
@ivankraev4264 - 02.02.2023 07:26

You are like Matt Pocock but for javascript 😀 Great content

Ответить
@mattshnoop
@mattshnoop - 02.02.2023 07:07

Also good to look into the other focus styles! There are focus-within and focus-visible. Good for other things.

Ответить
@sveinnthz
@sveinnthz - 02.02.2023 03:15

instantly subscribed, best presented web dev video i’ve ever seen

Ответить
@lamarredavy8145
@lamarredavy8145 - 02.02.2023 01:40

Thank you for all your videos, short and so usefull !

Ответить