{"id":15180474,"url":"https://github.com/darkleaf/form","last_synced_at":"2025-10-01T21:30:20.223Z","repository":{"id":62432239,"uuid":"91379029","full_name":"darkleaf/form","owner":"darkleaf","description":"Form builder for reagent library","archived":true,"fork":false,"pushed_at":"2017-08-21T12:07:43.000Z","size":233,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-15T09:57:33.870Z","etag":null,"topics":["bootstrap4","clojure-spec","clojurescript","form-builder","reagent","reagent-components"],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/darkleaf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-15T19:56:58.000Z","updated_at":"2023-01-28T20:57:53.000Z","dependencies_parsed_at":"2022-11-01T20:45:40.899Z","dependency_job_id":null,"html_url":"https://github.com/darkleaf/form","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darkleaf%2Fform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darkleaf%2Fform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darkleaf%2Fform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darkleaf%2Fform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/darkleaf","download_url":"https://codeload.github.com/darkleaf/form/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234897368,"owners_count":18903646,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bootstrap4","clojure-spec","clojurescript","form-builder","reagent","reagent-components"],"created_at":"2024-09-27T16:20:29.689Z","updated_at":"2025-10-01T21:30:19.819Z","avatar_url":"https://github.com/darkleaf.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/darkleaf/form.svg?branch=master)](https://travis-ci.org/darkleaf/form)\n[![Coverage Status](https://coveralls.io/repos/github/darkleaf/form/badge.svg)](https://coveralls.io/github/darkleaf/form)\n[![Clojars Project](https://img.shields.io/clojars/v/darkleaf/form.svg)](https://clojars.org/darkleaf/form)\n\n# Features\n\n+ twitter bootstrap4\n+ nested forms support\n+ interface for i18n engines\n+ interface for validation engines\n+ [clojure.spec integration](src/darkleaf/form/spec_integration.cljs)\n+ complete test coverage\n\n# Demo\n\n+ [demo](https://darkleaf.github.io/form/)\n+ [demo source](test/darkleaf/form_test/demo.cljs)\n\n# Installation\n\n```clojure\n[reagent \"0.7.0\"]\n[darkleaf/form \"0.1.0\"]\n```\n\n# Usage example\n\n```html\n\u003c!doctype html\u003e\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003ctitle\u003eForm\u003c/title\u003e\n\n    \u003cmeta charset=\"utf-8\" /\u003e\n    \u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1, shrink-to-fit=no\" /\u003e\n\n    \u003c!-- add bootstrap styles --\u003e\n    \u003clink rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css\" integrity=\"sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ\" crossorigin=\"anonymous\" /\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003cdiv class=\"container\"\u003e\n      \u003cdiv id=\"point\"\u003eapp mount point\u003c/div\u003e\n    \u003c/div\u003e\n    \u003cscript type=\"text/javascript\" src=\"build/dev/main.js\"\u003e\u003c/script\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\n```clojure\n(ns app\n  (:require\n   [reagent.core :as r]\n   [darkleaf.form.context :as ctx]\n   [darkleaf.form.bootstrap4 :as bootstrap]))\n\n(defn i18n-error [path error]\n  \"some logic\")\n\n(defn i18n-label [path]\n  \"some logic\")\n\n(defn form [data errors]\n  ;; i18n is optional\n  (let [f (ctx/build data errors update {:error i18n-error, :label i18n-label})]\n    [:form\n     [bootstrap/text f :some-attribute-name]]))\n\n(def data {:some-attrubte-name \"foo bar\"})\n(def errors {})\n\n(r/render [form data errors]\n          (.getElementById js/document \"point\"))\n```\n\nPlease see demo or tests for more examples.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarkleaf%2Fform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdarkleaf%2Fform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarkleaf%2Fform/lists"}