Generates reactive HTML forms directly from type definitions. These forms can be used with ScalaJS and Outwatch and the generated HTML/CSS is fully customizable. Scala 2.13 and 3 are supported. Here's a Demo and it's Code.
libraryDependencies += "com.github.fdietze" %%% "formidable" % "<version>"
import outwatch._ import outwatch.dsl._ import colibri.reactive._ import formidable._ case class Person(name: String, age: Option[Int]) val state:Var[Person] = Form.state[Person] div( Form[Person].render(state), div(state.map(_.toString)), )
Formidable defines a typeclass
Form[T] with many default instances:
- sealed traits
- case classes
- recursive types
- generic types
Automatic derivation is achieved using Magnolia.