Generate validating forms from JSON schemas.
elm package install potocpav/elm-json-forms
- Can handle most of the UI Schema specification
- Can handle almost all JSON Schema features (draft-04 and draft-06).
- Generates all common types of input fields (
text
,select
, etc.) with optional labels and descriptions. - Error messages can easily be customized as needed.
- Supports custom string formats using validation functions (similar to Json decoders).
- Comes with default Tailwind CSS theme in the
Theme
object that can be customised.
- Fix multiple forms on the same page sharing IDs
- Validate e-mails
-
Layout
- Remove unnecessary nested formRow items for horizontal layout inside vertical layout
-
Control Example
- Descriptions as tooltips for Booleans
- Asterisks for required fields
- Toggle buttons for booleans
- Trim text
- Restrict text
- Hide required asterisk
-
Categorization Example
- Fix multiple categorizations in one schema (in vertical layout)
- Rules to show and hide categories
- Implement prev/next buttons
- Implement stepper variant
-
Rule example
- Groups
- Group labels
- Rule to enable/disable
- Rule to show/hide
- Layout example
-
Generate UI Schema example
- Fix groups
- There is currently no support for linked schemas using
$ref
.
See the example project for examples