Material Components for Elm

I am pleased to announce the release of material-components-web-elm. It is my latest attempt of integrating Material Components for the web with Elm.

Using custom elements it leverages the existing implementation and I hope it makes using material components in Elm easy and intuitive. This is the simple-counter example from the GitHub repository on Ellie. The demo shows the currently supported component set.

If anyone is trying this out, I would be more than happy to hear your feedback. Feel free to reach out on Slack or GitHub issues, especially if you are having trouble with anything or if you are discovering a bug.

25 Likes

For completeness sake let me mention a “competing” alternative. @aforemny also made a port of Google’s Material Components for the Web using native Elm, so just reusing the SASS, and reimplementing the JavaScript in Elm: elm-mdc.

That’s the version I prefer. Obviously there’s work involved in porting the JavaScript now and then, but for me it integrates better with Elm, and I’m committed to maintaining this. There’s still a little bit of JavaScript needed to implement functionality not in Elm (for example we can’t access onScroll etc etc] but at its core it’s all pure Elm.

A web components approach has the advantage you don’t have to reimplement the JavaScript. And it’s the library @aforemny thinks will work the best for him in the future.

I’ve learned a lot about Elm by looking and maintaining @aforemny code, and I’ve appreciated all his help! Regardless what version you use, let’s create intuitive and beautiful applications with Material Design!

3 Likes

Did you realize that @aforemny is the one that created this thread?

5 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.