Solar Eclipse Toggle Web Component (two state dark/light mode toggle)
Zach Leatherman · Sep 14, 2026
In Trying out a Two-state Dark Mode Toggle I summarized the Two-state Dark and Light mode Toggle discussion as I experimented with a toggle in my personal website footer.
I decided to fold this into a reusable component so that I can benefit from this work on future websites (and you can use it too, I guess!). It’s called @zachleat/solar-eclipse-toggle and you can find it on GitHub or on npm now.
Keep reading
Out of respect for the author only the opening is shown here. Read the rest on the original site, or in HorizonReader with highlights, notes and AI help.
Meaningful Audits are Important Look at these two npm audit outputs generated this morning and tell me which project is more secure: $ npm audit # uh… 521 lines of vulnerability reports truncated 78 vulnerabilities (7 low, 23 moderate, 46 h
I am a habitual tab hoarder so I created a Firefox addon to help me manage every one of my very special browser tabs. Sort tabs by oldest, unload them, find duplicates, and consolidate tabs to a single window — buncha useful stuff in there!
Millions of Large-Language-Model-generated words have been spilled on craftsmanship in this gilded-age of software development. We now have agents to plan how code will be written, agents to write code, agents to review code, agents to orch
I’ve been doing some spring/fall cleaning and found an unpublished follow-up component to <snow-fall> (a web component to “snow” on your website — which also happens to work with emoji too). Originally it was created as an easter egg for Bl
…and another one. This little (zero CSS) web component has two modes: progressively enhance a hierarchy of server rendered <ol> or <ul> elements (or conveniently client render them for you if they don’t exist) to highlight which are current