Loading video...

Video Failed to Load

Go Home

use CSS :has() & :user-valid/invalid to power form micro-interactions .group:has(:valid) { --color: var(--valid); } input:user-invalid + .error { display: block; } :user-valid/invalid detects if an input is valid and if it has been interacted with 🔥 no js dirty checkin' 🤙

53,347 views • 1 year ago •via X (Twitter)

10 Comments

jhey ▲🐻🎈's profile picture
jhey ▲🐻🎈1 year ago

here's the @CodePen link! 🚀 got a request for this in "the other place™" so threw together a new demo now that :user-valid/invalid has good support 🙌

Kyle TechSquidTV's profile picture
Kyle TechSquidTV1 year ago

Beautiful 👏

Steven's profile picture
Steven1 year ago

Bro you’re cooking on thanksgiving? Love it

jhey ▲🐻🎈's profile picture
jhey ▲🐻🎈1 year ago

not now - i'm waitin' for the cookin' 💀 got the game on, Steam Deck in hand 😇

Marlon Stevenson's profile picture
Marlon Stevenson1 year ago

Really sweet animation. Bookmarked.

Marcos Esqueda's profile picture
Marcos Esqueda1 year ago

How did you do the grid pattern?

Riaad Arif's profile picture
Riaad Arif1 year ago

Hats off to you! 🎩

Abolfazl's profile picture
Abolfazl1 year ago

That's so beautiful bro🤝

Patil Ketan's profile picture
Patil Ketan1 year ago

I love your design I try to make it useing ai but I can’t can you give me any idea ?

Matthias Martin's profile picture
Matthias Martin1 year ago

Would be cool to have a CSS only solution for different error messages depending on the input.

Related Videos