I am attempting to use Elm for a website but am running into some very basic misunderstandings. The main question is:
How does one make different Elm libs work together?
If I use rtfeldman/elm-css, how do I go from “styled” to unstyled" within different parts of my project so I can manipulate regular divs with other libraries?
How can I add animations with mdgriffith/elm-animator that use elm-tailwind-modules doesn’t offer out of the box?
Are there standard patterns for getting out of rundis/elm-bootstrap types within a project (not just in the view
function), again, for using other libs that expect regular divs for manipulation?
It seems like I’m stuck inside layers of “types” that I cannot escape if I need to do something that a particular lib doesn’t offer. Or there are workarounds (like Korban’s excellent elm-animator intro blog post, but they feel hacky. I’m either inside one wrapper type or another, and the “way out” is not obvious to me.
This is where React starts to look a lot more attractive: it’s just jsx
that gets converted to HTML with a couple gotchas that IDEs typically cover over (class
→ className
, for example). So we’re only dealing with essentially an HTML type with no layers that can work with any other framework’s examples with little effort. I understand there is very little type safety there without typescript or something similar, and I prefer Elm, but I’m having trouble getting over this basic hurdle.
Any help is greatly appreciated!