Saad Ahmad’s Post

🚀 𝗕𝘂𝗶𝗹𝘁 & 𝗣𝘂𝗯𝗹𝗶𝘀𝗵𝗲𝗱: 𝘂𝘀𝗲-𝘁𝗵𝗲𝗺𝗲-𝗺𝗼𝗱𝗲 🌗 𝘈 𝘭𝘪𝘨𝘩𝘵𝘸𝘦𝘪𝘨𝘩𝘵 𝘙𝘦𝘢𝘤𝘵 𝘩𝘰𝘰𝘬 𝘧𝘰𝘳 𝘥𝘢𝘳𝘬/𝘭𝘪𝘨𝘩𝘵 𝘮𝘰𝘥𝘦 Dark mode shouldn’t be complicated or overly opinionated. That’s why I built 𝘂𝘀𝗲-𝘁𝗵𝗲𝗺𝗲-𝗺𝗼𝗱𝗲, an open‑source React hook that focuses purely on 𝘁𝗵𝗲𝗺𝗲 𝘀𝘁𝗮𝘁𝗲 𝗺𝗮𝗻𝗮𝗴𝗲𝗺𝗲𝗻𝘁, while giving developers full control over styling. ✅ 𝗪𝗵𝗮𝘁 𝗶𝘁 𝗵𝗮𝗻𝗱𝗹𝗲𝘀 𝗼𝘂𝘁 𝗼𝗳 𝘁𝗵𝗲 𝗯𝗼𝘅: • Light and dark theme switching • System preference detection (prefers-color-scheme) • Persistent theme using localStorage • Cross‑tab theme synchronization • SSR‑safe (works with Next.js) • Zero runtime dependencies You control the UI. The hook handles the logic. 🔗 𝗟𝗶𝘃𝗲 𝗗𝗲𝗺𝗼: https://lnkd.in/d2AprnYd 📝 𝗙𝘂𝗹𝗹 𝘁𝗲𝗰𝗵𝗻𝗶𝗰𝗮𝗹 𝗯𝗹𝗼𝗴 𝗼𝗻 𝗗𝗘𝗩.𝘁𝗼: https://lnkd.in/d78gT_zB 📦 𝗻𝗽𝗺 𝗽𝗮𝗰𝗸𝗮𝗴𝗲: https://lnkd.in/dHF6iM7T This project was a great learning experience around: • npm publishing & versioning • token‑based npm security • documentation & demos • shipping production‑ready open source Feedback, suggestions, and contributions are always welcome 🚀 #React #JavaScript #Frontend #OpenSource #WebDevelopment #NPM #DarkMode #OSS

  • graphical user interface, text, application

To view or add a comment, sign in

Explore content categories