New web component dropped: <solar-eclipse-toggle>
https://www.zachleat.com/web/solar-eclipse/
(look, sometimes I open source code just so I can use it on all of my websites)
Also posted to Bluesky.
13 replies
@zachleat At least you namespace it when you publish to npm.
@knowler it’s gotta have that warning on it
lovely!
@mrose thanks Mitch! it was a team effort!
thank you to @cwilcox808 for the collab!
in case you want more feedback 😅
imo the separator makes it a bit ambiguous to what "Auto" is referring to, and i first read it like the toggle thinks the current selection is Auto, but it's for switching _to_ light/auto. maybe (auto) in quotes without separator would work better?I did play around with SYSTEM but I see what you mean! Hmmmmmm…
i just saw the new design, and i think it works a lot better! 🎉
appreciate the feedback! we’re always iterating 🙌
that's the way to greatness!
I was hoping this would turn your site to dark mode, but only when your location is experiencing an eclipse.
…oh my god
For anyone who wants to implement this aa.usno.navy.mil/data/api#sol...