FancyForms is a library for building forms in Elm. It is designed with the following goals in mind:
Msg and one field on the model.The library is still under active development and is still missing some features to be production ready.
Checklist:
I have not invested heavily into the Package Docs yet. But there are some detailed examples with explanations in the dedicated docs
https://blog.axelerator.de/fancy-forms/
The API is heavily inspired by dillonkearns/elm-form 🙏
But contrary to elm-form I did not aim for compatibilty with elm-pages and lamdera.
So I do blatanlty store functions in the Model for example.
List (Html msg) over Html msg as return typeFunctions that return List (Html msg) are more composable. Specifically when nesting
the "wrapping" component can decide whether to concatenate the list or not.
This allows for more flexibility in the markup to for example account for markup required by certain CSS frameworks like Bootstrap.
Instead of having labels and errors in different containers they can all live next to each other.
Having to proivde a custom error type might seem like it adds unnecessary complexity. The primary motivation is to allow to keep error messages translatable without having to draw the translation logic into the form library (or the form logic in the application).