- https://grafikart.github.io/headless-elements/?path=/docs/scroll-top--default-story
- Github Time Elements by GitHub.
- Router Manager by Erik Ringsmuth.
- Responsive Embed by Joselito Júnior. Add YouTube, Vimeo and other multimedia content to your pages, letting the browser calculate the height based on the width of their containing block. You just have to define the aspect ratio of the media.
- Lottie Player
-
-
Save janwirth/9ac1cf6ec4cf0fa81b75a0eb4dea0018 to your computer and use it in GitHub Desktop.
Fetching data / hooks with custom elements
Quoting @billstclair from the elm slack.
In using TweetDeck recently, I noticed that it responds properly to my Mac settings, entering Dark mode at night and going back to Light mode during the day. I didn’t know before now that there was an HTML DOM API for that, so I found it, and created a custom-element to send those notifications to Elm.
An example is at mammudeck.com/watch-color-scheme.html (change your system color scheme and watch the example window change).
To get it to work in your own application, you need two files:
The CustomElement.WatchColorScheme module.
watch-color-scheme.js, which must be loaded in the head section of your index.html.
Then you add a watchColorScheme element to your view method, with an onChange attribute, and a Msg to handle the changes.
This commit shows those two, plus the other files necessary for the example (and a lower-level example, which tests the JS in JS, without Elm).
I have not yet integrated this into the Mammudeck application. Soon.
I also haven’t tested the code on Windows or Linux, or in any non-Chromium browsers (I did Brave and Chrome on my M2 MacBook Air). If you do so, and it doesn’t work, please let me know.
Portal web component for elm
https://gist.github.com/wolfadex/45ae81f73c79a1c092cdba60aa218201