{"id":13800070,"url":"https://github.com/zrho/purescript-optic-ui","last_synced_at":"2026-02-21T15:35:28.315Z","repository":{"id":58235113,"uuid":"41410172","full_name":"zrho/purescript-optic-ui","owner":"zrho","description":"PureScript UI framework based on lenses.","archived":false,"fork":false,"pushed_at":"2016-10-10T22:48:14.000Z","size":102,"stargazers_count":122,"open_issues_count":7,"forks_count":10,"subscribers_count":13,"default_branch":"master","last_synced_at":"2026-01-23T13:28:14.386Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PureScript","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/zrho.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":"2015-08-26T07:04:27.000Z","updated_at":"2024-12-12T21:57:01.000Z","dependencies_parsed_at":"2022-08-31T00:21:16.063Z","dependency_job_id":null,"html_url":"https://github.com/zrho/purescript-optic-ui","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/zrho/purescript-optic-ui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zrho%2Fpurescript-optic-ui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zrho%2Fpurescript-optic-ui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zrho%2Fpurescript-optic-ui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zrho%2Fpurescript-optic-ui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zrho","download_url":"https://codeload.github.com/zrho/purescript-optic-ui/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zrho%2Fpurescript-optic-ui/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29684478,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T14:31:22.911Z","status":"ssl_error","status_checked_at":"2026-02-21T14:31:22.570Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-08-04T00:01:08.932Z","updated_at":"2026-02-21T15:35:28.255Z","avatar_url":"https://github.com/zrho.png","language":"PureScript","readme":"Optic UI\n================\n\n[![Build Status](https://travis-ci.org/zrho/purescript-optic-ui.svg?branch=master)](https://travis-ci.org/zrho/purescript-optic-ui)\n[![Maintainer: zrho](https://img.shields.io/badge/maintainer-zrho-lightgrey.svg)](http://github.com/zrho)\n\nOptic UI is a Purescript library that allows to write single page web user\ninterfaces declaratively and concisely with the help of lenses and traversals:\n\nUI components are defined in a profunctor that gives them access to a view\nmodel, a state local to the component. Child components that access only a part\nof the state of their parent can be embedded in a bigger component using lenses\nand traversals that focus on the respective sub-states. Components provide a\nhandler function that - given a new state - triggers an update of the UI and\ngenerate a view that is finally rendered using virtual-dom.\n\n\nExamples\n---------------------\n\n```purescript\nmain = animate false $ with \\on h -\u003e\n  let clicked _ = updatePure h (not on)\n  in mconcat $ ui \u003c$\u003e\n    [ H.h1_ $ text \"Toggle Button\"\n    , H.button [H.titleA \"Toggle\", H.onClick clicked] $ text $ if on then \"On\" else \"Off\"\n    ]\n```\n\n```purescript\nmain = animate \"Hello World\" $ withView H.div_ $ with \\s h -\u003e mconcat\n  [ ui $ H.h1_ $ text \"Synchronized Text Fields\"\n  , ui $ H.p_ $ text \"First text field:\"\n  , textField []\n  , ui $ H.p_ $ text \"Second text field:\"\n  , textField []\n  ]\n```\n\n```purescript\nmain = animate (Tuple \"Left\" \"Right\") $ withView H.div_ $ mconcat\n  [ ui $ H.h1_ $ text \"Independent Text Fields\"\n  , ui $ H.p_ $ text \"First text field:\"\n  , _1 $ textField []\n  , ui $ H.p_ $ text \"Second text field:\"\n  , _2 $ textField []\n  ]\n```\n\nFor more examples, have a look at the `examples` directory:\n\n- [Todo Manager](examples/todo/src/Main.purs)\n- [AJAX Example](examples/ajax/src/Main.purs)\n- [Effects Example](examples/effects/src/Main.purs)\n","funding_links":[],"categories":["UI Libraries"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzrho%2Fpurescript-optic-ui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzrho%2Fpurescript-optic-ui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzrho%2Fpurescript-optic-ui/lists"}