ๆญฃๅœจๅŠ ่ฝฝ่ง†้ข‘...

่ง†้ข‘ๅŠ ่ฝฝๅคฑ่ดฅ

Introducing ๐š‘๐š’๐š-๐šŠ๐š›๐šŽ๐šŠโ€”a collection of Tailwind CSS utility classes for expanding the hit area of interactive elements. Small hit areas are a silent UX killer. One class fixes it. Distributed via shadcn registry - see link below.

140,470 ๆฌก่ง‚็œ‹ โ€ข 7 ไธชๆœˆๅ‰ โ€ขvia X (Twitter)

59 ๆก่ฏ„่ฎบ

Valerii Strilets ๐Ÿ‡บ๐Ÿ‡ฆ ็š„ๅคดๅƒ
Valerii Strilets ๐Ÿ‡บ๐Ÿ‡ฆ7 ไธชๆœˆๅ‰

@tailwindcss @shadcn done

kian bazza ็š„ๅคดๅƒ
kian bazza7 ไธชๆœˆๅ‰

let's goooo ๐Ÿ’ช also it seems like I left some dead code in there ๐Ÿ˜ฌ; feel free to re-install to remove the --๐š‘๐š’๐š-๐šŠ๐š›๐šŽ๐šŠ-๐š‹๐š•๐šŽ๐šŽ๐š-* related code may release that as an add-on later the intention was to add a ๐š‘๐š’๐š-๐šŠ๐š›๐šŽ๐šŠ-๐š‹๐š•๐šŽ๐šŽ๐š-* utility to add "extra" hit area to account for borders, instead of doing "๐š‘๐š’๐š-๐šŠ๐š›๐šŽ๐šŠ-๐Ÿบ.๐Ÿธ๐Ÿป" which may not read as well you could do "๐š‘๐š’๐š-๐šŠ๐š›๐šŽ๐šŠ-๐Ÿบ ๐š‘๐š’๐š-๐šŠ๐š›๐šŽ๐šŠ-๐š‹๐š•๐šŽ๐šŽ๐š" but wasn't sold enough on it

Valerii Strilets ๐Ÿ‡บ๐Ÿ‡ฆ ็š„ๅคดๅƒ
Valerii Strilets ๐Ÿ‡บ๐Ÿ‡ฆ7 ไธชๆœˆๅ‰

@tailwindcss @shadcn Oh, sure, Iโ€™ll reinstall it, thanks!

Tom Menezes ็š„ๅคดๅƒ
Tom Menezes7 ไธชๆœˆๅ‰

@tailwindcss @shadcn awesome! really like your /craft as well

kian bazza ็š„ๅคดๅƒ
kian bazza7 ไธชๆœˆๅ‰

@tailwindcss @shadcn Thanks Tom ๐Ÿ™ May need to do a post on that page, I don't really advertise it but it's basically my portfolio haha

Saul ็š„ๅคดๅƒ
Saul7 ไธชๆœˆๅ‰

@tailwindcss @shadcn Would love to see a non shadcn registry version. Just a copy&paste for the globals.css

designer ็š„ๅคดๅƒ
designer7 ไธชๆœˆๅ‰

@tailwindcss @shadcn Whatโ€™s the CSS that powers it?

zenith ็š„ๅคดๅƒ
zenith7 ไธชๆœˆๅ‰

@tailwindcss @shadcn looks very familiar lol. cooked on the demo video fr fr!

kian bazza ็š„ๅคดๅƒ
kian bazza7 ไธชๆœˆๅ‰

@tailwindcss @shadcn hahaha I told you I was about to make a post on hit areas ๐Ÿคฃ thank u sir much appreciated ๐Ÿ™

zenith ็š„ๅคดๅƒ
zenith7 ไธชๆœˆๅ‰

@tailwindcss @shadcn nah bro, c'mmon. i'm Zenith still 20. can't be calling me sir!

kian bazza ็š„ๅคดๅƒ
kian bazza7 ไธชๆœˆๅ‰

@tailwindcss @shadcn i apologize sincerely thank u unc

zenith ็š„ๅคดๅƒ
zenith7 ไธชๆœˆๅ‰

@tailwindcss @shadcn ๐Ÿคฃ๐Ÿคฃ

Alfon ็š„ๅคดๅƒ
Alfon7 ไธชๆœˆๅ‰

@tailwindcss @shadcn Thank you for making the web more accessible ๐Ÿ™

kian bazza ็š„ๅคดๅƒ
kian bazza7 ไธชๆœˆๅ‰

@tailwindcss @shadcn ๐Ÿ

Sadi Moodi ็š„ๅคดๅƒ
Sadi Moodi7 ไธชๆœˆๅ‰

@tailwindcss @shadcn This is actually brilliant. Hit area bugs are the silent killer of UX - users click, nothing happens, they rage-quit. I've seen 30% drop-off on mobile forms from tiny tap targets alone. The real win? Consistent 44px minimum across all interactive elements. No excuses.

kian bazza ็š„ๅคดๅƒ
kian bazza7 ไธชๆœˆๅ‰

@tailwindcss @shadcn "I've seen 30% drop-off on mobile forms from tiny tap targets alone" that is a crazy stat if it's true thanks for the support ๐Ÿ’ช

Ben Sehl ็š„ๅคดๅƒ
Ben Sehl7 ไธชๆœˆๅ‰

@tailwindcss @shadcn So smart. Have needed this many times.

kian bazza ็š„ๅคดๅƒ
kian bazza7 ไธชๆœˆๅ‰

@tailwindcss @shadcn Thanks Ben ๐Ÿ™

Vlad Sazonau ็š„ๅคดๅƒ
Vlad Sazonau7 ไธชๆœˆๅ‰

@tailwindcss @shadcn Very cool, thank you ๐Ÿ™

kian bazza ็š„ๅคดๅƒ
kian bazza7 ไธชๆœˆๅ‰

@tailwindcss @shadcn Let me know how you like it Vlad ๐Ÿ™

Beyond Code (AJ ONeal) ็š„ๅคดๅƒ
Beyond Code (AJ ONeal)7 ไธชๆœˆๅ‰

@tailwindcss @shadcn No class needed. <label> <input ... /> </label> HTML solved this problem long before anyone even had it. I think this knowledge was temporarily lost when the aria bros gave everyone divitis, but... This is the way.

Jake ๐ŸŽ‰ ็š„ๅคดๅƒ
Jake ๐ŸŽ‰7 ไธชๆœˆๅ‰

@tailwindcss @shadcn <label> there u go

Jeff Rosen ็š„ๅคดๅƒ
Jeff Rosen7 ไธชๆœˆๅ‰

@tailwindcss @shadcn Nice. Link to repository?

Dilshod ็š„ๅคดๅƒ
Dilshod7 ไธชๆœˆๅ‰

@tailwindcss @shadcn nice one! what did you use for the video ๐Ÿ‘€?

kian bazza ็š„ๅคดๅƒ
kian bazza7 ไธชๆœˆๅ‰

@tailwindcss @shadcn I made a custom playground component to visualize & animate the hit areas (see below, pls forgive the spacing -- just prompted it quickly and didn't clean up) Then recorded each clip and inserted them into DaVinci Resolve

Dilshod ็š„ๅคดๅƒ
Dilshod7 ไธชๆœˆๅ‰

@tailwindcss @shadcn Insane!

Vicente Sanchez ็š„ๅคดๅƒ
Vicente Sanchez7 ไธชๆœˆๅ‰

@tailwindcss @shadcn crazy good

kian bazza ็š„ๅคดๅƒ
kian bazza7 ไธชๆœˆๅ‰

@tailwindcss @shadcn Thanks Vicente ๐Ÿ™

Matt Popovich ็š„ๅคดๅƒ
Matt Popovich7 ไธชๆœˆๅ‰

@tailwindcss @shadcn Damn this is dope

kian bazza ็š„ๅคดๅƒ
kian bazza7 ไธชๆœˆๅ‰

@tailwindcss @shadcn Thanks Matt ๐Ÿ™

Saul ็š„ๅคดๅƒ
Saul7 ไธชๆœˆๅ‰

@tailwindcss @shadcn This is such a great utility. Immediately adding this

kian bazza ็š„ๅคดๅƒ
kian bazza7 ไธชๆœˆๅ‰

@tailwindcss @shadcn Appreciate that Saul, lmk if you run into any issues

pedro costa โ€” oss/acc ็š„ๅคดๅƒ
pedro costa โ€” oss/acc7 ไธชๆœˆๅ‰

@tailwindcss @shadcn really cool!

kian bazza ็š„ๅคดๅƒ
kian bazza7 ไธชๆœˆๅ‰

@tailwindcss @shadcn Thank you Pedro ๐Ÿ’ช

Luis H. Ball Jr. ็š„ๅคดๅƒ
Luis H. Ball Jr.7 ไธชๆœˆๅ‰

@tailwindcss @shadcn Heck yes, been wanting something like this ๐Ÿ™๐Ÿป

kian bazza ็š„ๅคดๅƒ
kian bazza7 ไธชๆœˆๅ‰

@tailwindcss @shadcn Glad this was helpful!

Vu Nguyen ็š„ๅคดๅƒ
Vu Nguyen7 ไธชๆœˆๅ‰

@shadcn @tailwindcss looks clean! thank you

kian bazza ็š„ๅคดๅƒ
kian bazza7 ไธชๆœˆๅ‰

@shadcn @tailwindcss Thanks Vu, appreciate it!

Radhi ็š„ๅคดๅƒ
Radhi7 ไธชๆœˆๅ‰

@shadcn @tailwindcss Any particular reason why you wanted it as a shadcn registry instead of tailwind plugin?

kian bazza ็š„ๅคดๅƒ
kian bazza7 ไธชๆœˆๅ‰

@shadcn @tailwindcss my understanding was tailwind plugins are "legacy" cc @adamwathan

Lenni ็š„ๅคดๅƒ
Lenni7 ไธชๆœˆๅ‰

@tailwindcss @shadcn You're the man

Manar Benkraouda ็š„ๅคดๅƒ
Manar Benkraouda7 ไธชๆœˆๅ‰

@tailwindcss @shadcn why didn't you call it hitbox ๐Ÿ˜ญ๐Ÿ˜ญ๐Ÿ˜ญ (amazing job though)

Jarod ็š„ๅคดๅƒ
Jarod7 ไธชๆœˆๅ‰

@shadcn @tailwindcss Omg I was just thinking about making this, thank you for saving my tokens

kian bazza ็š„ๅคดๅƒ
kian bazza7 ไธชๆœˆๅ‰

@shadcn @tailwindcss Hahaha love it when that happens Let me know how it goes

Igor bedesqui ็š„ๅคดๅƒ
Igor bedesqui7 ไธชๆœˆๅ‰

@tailwindcss @shadcn so nice

andrw ็š„ๅคดๅƒ
andrw7 ไธชๆœˆๅ‰

@tailwindcss @shadcn why donโ€™t just use a <label/> ? genuine question

Deckard ็š„ๅคดๅƒ
Deckard7 ไธชๆœˆๅ‰

@shadcn @tailwindcss Immediately installing this, thank you ๐Ÿ™

kian bazza ็š„ๅคดๅƒ
kian bazza7 ไธชๆœˆๅ‰

@deckard_the_dev @shadcn @tailwindcss Thanks Deckard, lmk how it goes!

Hakimuddin K ็š„ๅคดๅƒ
Hakimuddin K7 ไธชๆœˆๅ‰

@tailwindcss @shadcn We missed bazza.

KTibow ็š„ๅคดๅƒ
KTibow7 ไธชๆœˆๅ‰

@tailwindcss @shadcn this example is terrible, the whole row should be a <label>

kian bazza ็š„ๅคดๅƒ
kian bazza7 ไธชๆœˆๅ‰

@anametolast @tailwindcss @shadcn you mean the whole cell, right? lol

KTibow ็š„ๅคดๅƒ
KTibow7 ไธชๆœˆๅ‰

@tailwindcss @shadcn it's better to make the whole row a label if you can (but of course if you're using literal <table> you can't do that)

Rohit ็š„ๅคดๅƒ
Rohit7 ไธชๆœˆๅ‰

@tailwindcss @shadcn goat video, btw love ur crafts ๐Ÿ˜™๐ŸคŒ

Nathan ็š„ๅคดๅƒ
Nathan7 ไธชๆœˆๅ‰

@shadcn @tailwindcss Nice

kian bazza ็š„ๅคดๅƒ
kian bazza7 ไธชๆœˆๅ‰

@shadcn @tailwindcss Thanks Nathan ๐Ÿ™

Ajinkya ็š„ๅคดๅƒ
Ajinkya7 ไธชๆœˆๅ‰

@shadcn @tailwindcss @ishartwt need this on the scrollbar in timeline

Stammy ็š„ๅคดๅƒ
Stammy7 ไธชๆœˆๅ‰

@tailwindcss @shadcn nice work!

qualk ๐ŸŒฒ๐Ÿช“๐Ÿชง๐Ÿฆญ ็š„ๅคดๅƒ
qualk ๐ŸŒฒ๐Ÿช“๐Ÿชง๐Ÿฆญ7 ไธชๆœˆๅ‰

@tailwindcss @shadcn im sold

Szymon Krzemiล„ski ็š„ๅคดๅƒ
Szymon Krzemiล„ski7 ไธชๆœˆๅ‰

@tailwindcss @shadcn Does this work with slider handles?

็›ธๅ…ณ่ง†้ข‘