Did you know HTML has a native dialog tag that includes built-in accessibility wins!? It's an elegant little API and it's really well supported. Here's how to get a basic version going with React.
🔗 Key Links 🔗
Github: github.com/coding-in-public/react-dialog-walkthrou…
---------------------------------------
📹 Related Videos 📹
ForwardRef video: • Never Forget React forwardRef Again
Emmet in HTML: • Emmet Expansion with HTML (How to typ...
---------------------------------------
⏲️ Timestamps ⏲️
0:00 Introduction
0:40 Setup
2:25 Basic dialog setup
5:42 Adding dialog content
8:01 Add a close button to the dialog
8:27 Close dialog on outside click
10:51 Abstracting dialog to a separate component
---------------------------------------
🌐 Connect With Me 🌐
Website: codinginpublic.dev/
Blog: chrispennington.blog/
Twitter: twitter.com/cpenned
Patreon: www.patreon.com/coding_in_public
Buy Me a Coffee: www.buymeacoffee.com/chrispennington
コメント