{"id":21942809,"url":"https://github.com/react-declarative/react-declarative-lite","last_synced_at":"2026-02-13T06:41:51.024Z","repository":{"id":249777561,"uuid":"830880232","full_name":"react-declarative/react-declarative-lite","owner":"react-declarative","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-17T16:56:42.000Z","size":2116,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-22T18:55:26.449Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/react-declarative.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-07-19T07:35:26.000Z","updated_at":"2025-02-17T16:56:46.000Z","dependencies_parsed_at":"2024-07-23T09:44:01.543Z","dependency_job_id":"5449badf-9651-40d1-a97c-591df578b0fb","html_url":"https://github.com/react-declarative/react-declarative-lite","commit_stats":null,"previous_names":["react-declarative/react-declarative-lite"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/react-declarative/react-declarative-lite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-declarative%2Freact-declarative-lite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-declarative%2Freact-declarative-lite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-declarative%2Freact-declarative-lite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-declarative%2Freact-declarative-lite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/react-declarative","download_url":"https://codeload.github.com/react-declarative/react-declarative-lite/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-declarative%2Freact-declarative-lite/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29398144,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T06:24:03.484Z","status":"ssl_error","status_checked_at":"2026-02-13T06:23:12.830Z","response_time":78,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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-11-29T03:26:41.324Z","updated_at":"2026-02-13T06:41:50.998Z","avatar_url":"https://github.com/react-declarative.png","language":"TypeScript","readme":"# ⚛️ react-declarative-lite\n\n\u003e The `lite` verion of the [react-declarative](https://github.com/react-declarative/react-declarative)\n\n[![npm](https://img.shields.io/npm/v/react-declarative-lite.svg?style=flat-square)](https://npmjs.org/package/react-declarative-lite)\n\n![meme](https://github.com/react-declarative/react-declarative/blob/HEAD/meme.png)\n\nThis is a lighter version of [react-declarative](https://www.npmjs.com/package/react-declarative) which exports the `\u003cOne /\u003e` component and dependencies only and as such makes the library slightly faster and smaller. Unlike `react-declarative`, it doesn't provide any additional overhead like state management. For a note, that library should be used when you want to use `\u003cOne /\u003e` forms in existing app\n\n## Contribute\n\n\u003e [!IMPORTANT]\n\u003e Made by using [react-declarative](https://github.com/react-declarative/react-declarative) to solve your problems. **⭐Star** and **💻Fork** It on github will be appreciated\n\n## Usage\n\n```bash\nnpm install react-declarative-lite\n```\n\n## Example\n\n```tsx\nimport { One, TypedField, FieldType, getInvalidFields } from \"react-declarative-lite\";\n\nexport const fields: TypedField[] = [\n    {\n        type: FieldType.Outline,\n        fields: [\n            {\n                type: FieldType.Typography,\n                typoVariant: 'h6',\n                placeholder: 'Example form',\n            },\n            {\n                type: FieldType.Text,\n                validation: {\n                    required: true,\n                    numeric: true,\n                    minNum: 5\n                },\n                name: 'first_field',\n            },\n            {\n                type: FieldType.Text,\n                validation: {\n                    required: true,\n                },\n                name: 'second_field',\n            },\n            {\n                type: FieldType.Text,\n                validation: {\n                    required: true,\n                },\n                name: 'third_field',\n            },\n            {\n                type: FieldType.Button,\n                sx: {\n                    mt: 3\n                },\n                buttonVariant: 'contained',\n                title: 'Submit',\n                click: (name, e, data, payload) =\u003e {\n                    const errors = getInvalidFields(fields, data, payload);\n                    if (errors) {\n                        const [error] = errors;\n                        notify(`${error.title}: ${error.error}`);\n                    } else {\n                        notify(\"The form is valid\");\n                    }\n                },\n            }\n        ]\n    }\n];\n\n...\n\n\u003cOne\n    fields={fields}\n/\u003e\n\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-declarative%2Freact-declarative-lite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freact-declarative%2Freact-declarative-lite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-declarative%2Freact-declarative-lite/lists"}