{"id":19920612,"url":"https://github.com/react-declarative/rn-declarative","last_synced_at":"2026-03-09T04:32:44.379Z","repository":{"id":251058597,"uuid":"835123208","full_name":"react-declarative/rn-declarative","owner":"react-declarative","description":"A responsive layout for the react-native","archived":false,"fork":false,"pushed_at":"2024-09-17T16:10:25.000Z","size":55658,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-09T15:31:40.117Z","etag":null,"topics":["expo","react-native","responsive","ui-kit","ui-kitten"],"latest_commit_sha":null,"homepage":"https://github.com/react-declarative/react-declarative","language":"TypeScript","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/react-declarative.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-07-29T07:54:58.000Z","updated_at":"2025-02-19T08:48:12.000Z","dependencies_parsed_at":"2025-05-03T06:41:21.088Z","dependency_job_id":null,"html_url":"https://github.com/react-declarative/rn-declarative","commit_stats":null,"previous_names":["react-declarative/rn-declarative"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/react-declarative/rn-declarative","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-declarative%2Frn-declarative","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-declarative%2Frn-declarative/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-declarative%2Frn-declarative/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-declarative%2Frn-declarative/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/react-declarative","download_url":"https://codeload.github.com/react-declarative/rn-declarative/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-declarative%2Frn-declarative/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30283425,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T02:57:19.223Z","status":"ssl_error","status_checked_at":"2026-03-09T02:56:26.373Z","response_time":61,"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":["expo","react-native","responsive","ui-kit","ui-kitten"],"created_at":"2024-11-12T22:05:18.519Z","updated_at":"2026-03-09T04:32:44.352Z","avatar_url":"https://github.com/react-declarative.png","language":"TypeScript","readme":"# ⚛️ rn-declarative\n\n\u003e Responsive layout for `react-native`\n\n![screencast](./assets/screencast.gif)\n\nThe howto guide available [by the link](https://github.com/react-declarative/rn-declarative/tree/master/docs/HOWTO.md)\n\n## Installation\n\nThe package is split into two parts: [rn-declarative](https://www.npmjs.com/package/rn-declarative) and [rn-declarative-eva](https://www.npmjs.com/package/rn-declarative-eva). The `rn-declarative` manage the core part: It independent from any UI Kit and can be easely installed to any project. The `rn-declarative-eva` contains bindings to the [UI Kitten](https://akveo.github.io/react-native-ui-kitten/) - an open source ui components for `react-native` build on top of [Eva Design](https://eva.design/). By replacing `rn-declarative-eva` package you can connect the `rn-declarative` to any UI kit, for example, [react-native-paper](https://reactnativepaper.com/)\n\n```bash\nnpm i @ui-kitten/components @eva-design/eva react-native-svg rn-declarative rn-declarative-eva\n```\n\n## Documentation\n\n\u003e [!IMPORTANT]\n\u003e This is a fork of project named [react-declarative](https://github.com/react-declarative/react-declarative). You should seek for documentation in that repo. **⭐Star** and **💻Fork** It on github will be appreciated\n\n\nThe `rn-declarative` contains the following fields\n\n```tsx\nFieldType.Combo, FieldType.Items, FieldType.Text, FieldType.YesNo, FieldType.Switch, FieldType.Radio, FieldType.Checkbox, FieldType.Component, FieldType.Button\n```\n\nAnd layouts\n\n```tsx\nFieldType.Group, FieldType.Fragment, FieldType.Layout, FieldType.Condition\n```\n\n## Code sample\n\n\u003e Responsive Forms for the React Native\n\n```tsx\nimport { One, FieldType, TypedField } from 'rn-declarative';\n\nimport { Text } from '@ui-kitten/components';\nimport { ScrollView } from 'react-native';\n\nconst fields: TypedField[] = [\n    {\n        type: FieldType.Component,\n        style: {\n            justifyContent: 'center',\n            width: '100%',\n            height: 125,\n        },\n        element: () =\u003e (\n            \u003cText category='h4'\u003e\n                Adaptive columns\n            \u003c/Text\u003e\n        ),\n    },\n    {\n        type: FieldType.Group,\n        style: {\n            width: '100%',\n        },\n        fields: [\n            {\n                type: FieldType.Group,\n                phoneStyle: {\n                    width: '100%',\n                },\n                tabletStyle: {\n                    width: '50%',\n                },\n                desktopStyle: {\n                    width: '25%',\n                },\n                fields: [\n                    {\n                        type: FieldType.Component,\n                        style: {\n                            width: '100%',\n                        },\n                        element: () =\u003e (\n                            \u003cText category='h6'\u003e\n                                FieldType.Text\n                            \u003c/Text\u003e\n                        ),\n                    },\n                    {\n                        type: FieldType.Text,\n                        style: {\n                            width: '100%',\n                        },\n                        name: 'text',\n                        title: 'Text',\n                        description: 'Single line',\n                    },\n                    {\n                        type: FieldType.Text,\n                        style: {\n                            width: '100%',\n                        },\n                        validation: {\n                            required: true,\n                        },\n                        dirty: true,\n                        name: 'text_invalid',\n                        title: 'Text',\n                        description: 'Invalid',\n                    },\n                    {\n                        type: FieldType.Text,\n                        style: {\n                            width: '100%',\n                        },\n                        inputMultiline: true,\n                        name: 'text',\n                        title: 'Text',\n                        description: 'Multi line',\n                    },\n                ],\n            },\n            {\n                type: FieldType.Group,\n                phoneStyle: {\n                    width: '100%',\n                },\n                tabletStyle: {\n                    width: '50%',\n                },\n                desktopStyle: {\n                    width: '25%',\n                },\n                fields: [\n                    {\n                        type: FieldType.Component,\n                        style: {\n                            width: '100%',\n                        },\n                        element: () =\u003e (\n                            \u003cText category='h6'\u003e\n                                FieldType.Combo\n                            \u003c/Text\u003e\n                        ),\n                    },\n                    {\n                        type: FieldType.Combo,\n                        style: {\n                            width: '100%',\n                        },\n                        itemList: [\n                            'Test 1',\n                            'Test 2',\n                            'Test 3',\n                        ],\n                        name: 'combo',\n                        title: 'Combo',\n                        placeholder: 'combo',\n                        description: 'Default',\n                    },\n                    {\n                        type: FieldType.Combo,\n                        noDeselect: true,\n                        style: {\n                            width: '100%',\n                        },\n                        itemList: [\n                            'Test 1',\n                            'Test 2',\n                            'Test 3',\n                        ],\n                        validation: {\n                            required: true,\n                        },\n                        dirty: true,\n                        name: 'combo_invalid',\n                        title: 'Combo',\n                        placeholder: 'combo',\n                        description: 'Invalid',\n                    },\n                    {\n                        type: FieldType.Combo,\n                        noDeselect: true,\n                        style: {\n                            width: '100%',\n                        },\n                        itemList: [\n                            'Test 1',\n                            'Test 2',\n                            'Test 3',\n                        ],\n                        name: 'combo',\n                        title: 'Combo',\n                        placeholder: 'combo',\n                        description: 'No deselect',\n                    },\n                ],\n            },\n            {\n                type: FieldType.Group,\n                phoneStyle: {\n                    width: '100%',\n                },\n                tabletStyle: {\n                    width: '50%',\n                },\n                desktopStyle: {\n                    width: '25%',\n                },\n                fields: [\n                    {\n                        type: FieldType.Component,\n                        style: {\n                            width: '100%',\n                        },\n                        element: () =\u003e (\n                            \u003cText category='h6'\u003e\n                                FieldType.Items\n                            \u003c/Text\u003e\n                        ),\n                    },\n                    {\n                        type: FieldType.Items,\n                        style: {\n                            width: '100%',\n                        },\n                        itemList: [\n                            'Test 1',\n                            'Test 2',\n                            'Test 3',\n                        ],\n                        name: 'items',\n                        title: 'Items',\n                        placeholder: 'items',\n                        description: 'Default',\n                    },\n                    {\n                        type: FieldType.Items,\n                        noDeselect: true,\n                        style: {\n                            width: '100%',\n                        },\n                        itemList: [\n                            'Test 1',\n                            'Test 2',\n                            'Test 3',\n                        ],\n                        validation: {\n                            required: true,\n                        },\n                        dirty: true,\n                        name: 'items_invalid',\n                        title: 'Items',\n                        placeholder: 'items',\n                        description: 'Invalid',\n                    },\n                    {\n                        type: FieldType.Items,\n                        noDeselect: true,\n                        style: {\n                            width: '100%',\n                        },\n                        itemList: [\n                            'Test 1',\n                            'Test 2',\n                            'Test 3',\n                        ],\n                        name: 'items',\n                        title: 'Items',\n                        placeholder: 'items',\n                        description: 'No deselect',\n                    },\n                ],\n            },\n            {\n                type: FieldType.Group,\n                phoneStyle: {\n                    width: '100%',\n                },\n                tabletStyle: {\n                    width: '50%',\n                },\n                desktopStyle: {\n                    width: '25%',\n                },\n                fields: [\n                    {\n                        type: FieldType.Component,\n                        style: {\n                            width: '100%',\n                        },\n                        element: () =\u003e (\n                            \u003cText category='h6'\u003e\n                                FieldType.YesNo\n                            \u003c/Text\u003e\n                        ),\n                    },\n                    {\n                        type: FieldType.YesNo,\n                        style: {\n                            width: '100%',\n                        },\n                        name: 'yesno',\n                        title: 'YesNo',\n                        placeholder: 'yesno',\n                        description: 'Default',\n                    },\n                    {\n                        type: FieldType.YesNo,\n                        noDeselect: true,\n                        style: {\n                            width: '100%',\n                        },\n                        validation: {\n                            required: true,\n                        },\n                        dirty: true,\n                        name: 'yesno_invalid',\n                        title: 'YesNo',\n                        placeholder: 'yesno',\n                        description: 'Invalid',\n                    },\n                    {\n                        type: FieldType.YesNo,\n                        noDeselect: true,\n                        style: {\n                            width: '100%',\n                        },\n                        name: 'yesno',\n                        title: 'YesNo',\n                        placeholder: 'yesno',\n                        description: 'No deselect',\n                    },\n                ]\n            },\n        ]\n    },\n    {\n        type: FieldType.Group,\n        baseline: true,\n        style: {\n            width: '100%',\n        },\n        fields: [\n            {\n                type: FieldType.Group,\n                phoneStyle: {\n                    width: '100%',\n                },\n                tabletStyle: {\n                    width: '50%',\n                },\n                desktopStyle: {\n                    width: '25%',\n                },\n                fields: [\n                    {\n                        type: FieldType.Component,\n                        style: {\n                            width: '100%',\n                        },\n                        element: () =\u003e (\n                            \u003cText category='h6'\u003e\n                                FieldType.Radio\n                            \u003c/Text\u003e\n                        ),\n                    },\n                    {\n                        type: FieldType.Radio,\n                        name: 'radio',\n                        radioValue: '1',\n                        title: 'Radio 1',\n                    },\n                    {\n                        type: FieldType.Radio,\n                        name: 'radio',\n                        radioValue: '2',\n                        title: 'Radio 2',\n                    },\n                    {\n                        type: FieldType.Radio,\n                        name: 'radio',\n                        radioValue: '3',\n                        title: 'Radio 3',\n                    },\n                ],\n            },\n            {\n                type: FieldType.Group,\n                phoneStyle: {\n                    width: '100%',\n                },\n                tabletStyle: {\n                    width: '50%',\n                },\n                desktopStyle: {\n                    width: '25%',\n                },\n                fields: [\n                    {\n                        type: FieldType.Component,\n                        style: {\n                            width: '100%',\n                        },\n                        element: () =\u003e (\n                            \u003cText category='h6'\u003e\n                                FieldType.Switch\n                            \u003c/Text\u003e\n                        ),\n                    },\n                    {\n                        type: FieldType.Switch,\n                        name: 'switch',\n                    },\n                    {\n                        type: FieldType.Switch,\n                        name: 'switch',\n                    },\n                    {\n                        type: FieldType.Switch,\n                        name: 'switch',\n                    },\n                ],\n            },\n            {\n                type: FieldType.Group,\n                phoneStyle: {\n                    width: '100%',\n                },\n                tabletStyle: {\n                    width: '50%',\n                },\n                desktopStyle: {\n                    width: '25%',\n                },\n                fields: [\n                    {\n                        type: FieldType.Component,\n                        style: {\n                            width: '100%',\n                        },\n                        element: () =\u003e (\n                            \u003cText category='h6'\u003e\n                                FieldType.Checkbox\n                            \u003c/Text\u003e\n                        ),\n                    },\n                    {\n                        type: FieldType.Checkbox,\n                        name: 'checkbox1',\n                    },\n                    {\n                        type: FieldType.Checkbox,\n                        name: 'checkbox2',\n                    },\n                    {\n                        type: FieldType.Checkbox,\n                        name: 'checkbox2',\n                    },\n                ],\n            },\n        ]\n    },\n    {\n        type: FieldType.Component,\n        style: {\n            justifyContent: 'center',\n            width: '100%',\n            height: 125,\n        },\n        element: () =\u003e (\n            \u003cText category='h4'\u003e\n                Adaptive form\n            \u003c/Text\u003e\n        ),\n    },\n    {\n        type: FieldType.Group,\n        style: {\n            width: '100%',\n        },\n        fields: [\n            {\n                type: FieldType.Text,\n                phoneStyle: {\n                    width: '100%',\n                },\n                tabletStyle: {\n                    width: '50%',\n                },\n                desktopStyle: {\n                    width: '33%',\n                },\n                inputMultiline: true,\n                name: 'text',\n                title: 'Text',\n                description: 'Multi line',\n            },\n            {\n                type: FieldType.Text,\n                phoneStyle: {\n                    width: '100%',\n                },\n                tabletStyle: {\n                    width: '50%',\n                },\n                desktopStyle: {\n                    width: '33%',\n                },\n                name: 'text',\n                title: 'Text',\n                description: 'Single line',\n            },\n            {\n                type: FieldType.Text,\n                phoneStyle: {\n                    width: '100%',\n                },\n                tabletStyle: {\n                    width: '50%',\n                },\n                desktopStyle: {\n                    width: '33%',\n                },\n                name: 'text',\n                title: 'Text',\n                description: 'Single line',\n            },\n            {\n                type: FieldType.Text,\n                phoneStyle: {\n                    width: '100%',\n                },\n                tabletStyle: {\n                    width: '50%',\n                },\n                desktopStyle: {\n                    width: '33%',\n                },\n                name: 'text',\n                title: 'Text',\n                description: 'Single line',\n            },\n            {\n                type: FieldType.Text,\n                phoneStyle: {\n                    width: '100%',\n                },\n                tabletStyle: {\n                    width: '50%',\n                },\n                desktopStyle: {\n                    width: '33%',\n                },\n                name: 'text',\n                title: 'Text',\n                description: 'Single line',\n            },\n            {\n                type: FieldType.Text,\n                phoneStyle: {\n                    width: '100%',\n                },\n                tabletStyle: {\n                    width: '50%',\n                },\n                desktopStyle: {\n                    width: '33%',\n                },\n                name: 'text',\n                title: 'Text',\n                description: 'Single line',\n            },\n        ],\n    },\n];\n\nexport const MainPage = () =\u003e {\n    return (\n        \u003cScrollView\u003e\n            \u003cOne fields={fields} onChange={console.log} /\u003e\n        \u003c/ScrollView\u003e\n    );\n};\n\nexport default MainPage;\n\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-declarative%2Frn-declarative","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freact-declarative%2Frn-declarative","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-declarative%2Frn-declarative/lists"}