{"id":13658564,"url":"https://github.com/dotnet-websharper/forms","last_synced_at":"2025-12-25T01:14:51.763Z","repository":{"id":68008389,"uuid":"41356574","full_name":"dotnet-websharper/forms","owner":"dotnet-websharper","description":"A library to build declarative, composable, reactive user interfaces with WebSharper.","archived":false,"fork":false,"pushed_at":"2025-06-20T15:16:06.000Z","size":287,"stargazers_count":14,"open_issues_count":3,"forks_count":3,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-06-20T16:29:56.734Z","etag":null,"topics":["forms","frp","fsharp","reactive","websharper"],"latest_commit_sha":null,"homepage":"https://websharper.com","language":"F#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dotnet-websharper.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2015-08-25T09:56:43.000Z","updated_at":"2025-06-20T15:15:58.000Z","dependencies_parsed_at":"2023-07-16T22:15:18.047Z","dependency_job_id":"e2493ee6-e16e-4fee-93ad-fa97ba8ce109","html_url":"https://github.com/dotnet-websharper/forms","commit_stats":null,"previous_names":["intellifactory/websharper.forms","intellifactory/websharper.ui.next.piglets"],"tags_count":61,"template":false,"template_full_name":null,"purl":"pkg:github/dotnet-websharper/forms","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotnet-websharper%2Fforms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotnet-websharper%2Fforms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotnet-websharper%2Fforms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotnet-websharper%2Fforms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dotnet-websharper","download_url":"https://codeload.github.com/dotnet-websharper/forms/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotnet-websharper%2Fforms/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262545022,"owners_count":23326654,"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":["forms","frp","fsharp","reactive","websharper"],"created_at":"2024-08-02T05:01:00.717Z","updated_at":"2025-12-25T01:14:51.725Z","avatar_url":"https://github.com/dotnet-websharper.png","language":"F#","funding_links":[],"categories":["Libraries"],"sub_categories":["Reactive libraries"],"readme":"# WebSharper.Forms\r\n\r\nForms are a functional, composable, and type-safe form abstraction for building reactive user interfaces in WebSharper,\r\nsimilar to Formlets but with fine control over the structure of the output.\r\n\r\nA sample Form:\r\n\r\n```fsharp\r\nlet LoginForm () =\r\n    Form.Return (fun user pass -\u003e user, pass)\r\n    \u003c*\u003e (Form.Yield \"\"\r\n        |\u003e Validation.IsNotEmpty \"Must enter a username\")\r\n    \u003c*\u003e (Form.Yield \"\"\r\n        |\u003e Validation.IsNotEmpty \"Must enter a password\")\r\n    |\u003e Form.WithSubmit\r\n    |\u003e Form.Run (fun (u, p) -\u003e\r\n        JS.Alert(\"Welcome, \" + u + \"!\")\r\n    )\r\n    |\u003e Form.Render (fun user pass submit -\u003e\r\n        div [] [\r\n            div [] [label [] [text \"Username: \"]; Doc.Input [] user]\r\n            div [] [label [] [text \"Password: \"]; Doc.PasswordBox [] pass]\r\n            Doc.Button \"Log in\" [] submit.Trigger\r\n            div [] [\r\n                Doc.ShowErrors submit.View (fun errors -\u003e\r\n                    errors\r\n                    |\u003e Seq.map (fun m -\u003e p [] [text m.Text])\r\n                    |\u003e Doc.Concat)\r\n            ]\r\n        ]\r\n    )\r\n```\r\n\r\n* [Tutorial][intro] - check here first to learn about Forms\r\n* Demos\r\n  * The [Pets example](http://try.websharper.com/snippet/Dark_Clark/0000Cy) from the tutorial on [Try WebSharper](https://try.websharper.com)\r\n  * The main [test project](https://github.com/dotnet-websharper/forms/tree/master/WebSharper.Forms.Tests) in this repository - check here for inline HTML and *templated* forms\r\n* [License][license] (Apache v2)\r\n* GitHub - [sources][gh], [tracker][issues]\r\n* Community\r\n  * [WebSharper on Gitter][gitter] - technical chat\r\n  * [WebSharper Forums][wsforums] - Got a question?\r\n  * [#websharper on freenode][chat]\r\n* [Need support?][contact] - IntelliFactory\r\n\r\n## Wait, formlets and piglets? - I am confused\r\n\r\n`WebSharper.Forms` (this project, aka. **reactive** piglets or `WebSharper.UI.Piglets`) is a reactive implementation of the original [WebSharper.Piglets](https://github.com/dotnet-websharper/piglets) library, using [WebSharper.UI](https://github.com/dotnet-websharper/ui), [WebSharper](https://websharper.com)'s main reactive library.\r\n\r\nPiglets are a novel UI abstraction pioneered by WebSharper, and are first documented in this IntelliFactory research paper:\r\n\r\n\u003e Loic Denuziere, Ernesto Rodriguez, Adam Granicz. **Piglets to the Rescue: Declarative User Interface Specification with Pluggable View Models**. In Symposium on Implementation and Application of Functional Languages (IFL), Nijmegen, The Netherlands, 2013. [ACM](https://dl.acm.org/citation.cfm?id=2620689), **[PDF](http://www.cs.ru.nl/P.Achten/IFL2013/symposium_proceedings_IFL2013/ifl2013_submission_29.pdf)**.\r\n\r\nFormlets have similarly been published in academia, among others in [this 2007 draft paper](https://www.cl.cam.ac.uk/~jdy22/papers/idioms-guide.pdf) by Ezra Cooper, Sam Lindley, Philip Wadler, and Jeremy Yallop at the University of Edinburgh.\r\n\r\nFormlets have first been ported to F# for WebSharper in 2009, enhanced for dependent flowlets and published in this IntelliFactory research paper:\r\n\r\n\u003e Joel Bjornson, Anton Tayanovskyy, Adam Granicz. **Composing Reactive GUIs in F# Using WebSharper**. In Symposium on Implementation and Application of Functional Languages (IFL), Alphen aan den Rijn, The Netherlands, 2010. pp. 203-216. [Springer](https://link.springer.com/chapter/10.1007/978-3-642-24276-2_13)\r\n\r\nThis early formlet library is available as [WebSharper.Formlets](https://github.com/dotnet-websharper/formlets), and a `WebSharper.UI`-based re-implementation is available as [WebSharper.UI.Formlets](https://github.com/dotnet-websharper/ui.formlets).\r\n\r\nGiven that reactive forms/piglets are more flexible than formlets, we recommend that you use `WebSharper.Forms` (this project) in your applications.\r\n\r\n\r\n[chat]: http://webchat.freenode.net/?channels=#websharper\r\n[contact]: http://intellifactory.com/contact\r\n[wsforums]: https://forums.websharper.com/\r\n[fsharp]: http://fsharp.org\r\n[gh]: http://github.com/intellifactory/websharper.forms\r\n[gitter]: https://gitter.im/intellifactory/websharper\r\n[intro]: http://github.com/intellifactory/websharper.forms/blob/master/docs/Introduction.md\r\n[issues]: http://github.com/intellifactory/websharper.forms/issues\r\n[license]: http://github.com/intellifactory/websharper.forms/blob/master/LICENSE.md\r\n[nuget]: http://nuget.org\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotnet-websharper%2Fforms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdotnet-websharper%2Fforms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotnet-websharper%2Fforms/lists"}