{"id":19238562,"url":"https://github.com/tmpfs/prism-primitives","last_synced_at":"2025-08-14T08:04:08.127Z","repository":{"id":57339213,"uuid":"119622425","full_name":"tmpfs/prism-primitives","owner":"tmpfs","description":"React Native primitives for Prism","archived":false,"fork":false,"pushed_at":"2019-05-16T05:33:19.000Z","size":271,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-05T15:43:54.536Z","etag":null,"topics":["components","css","primitives","prism","react","reactnative","ui"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/tmpfs.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":"2018-01-31T02:18:50.000Z","updated_at":"2019-05-16T05:33:11.000Z","dependencies_parsed_at":"2022-08-31T08:00:33.546Z","dependency_job_id":null,"html_url":"https://github.com/tmpfs/prism-primitives","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmpfs%2Fprism-primitives","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmpfs%2Fprism-primitives/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmpfs%2Fprism-primitives/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmpfs%2Fprism-primitives/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tmpfs","download_url":"https://codeload.github.com/tmpfs/prism-primitives/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240324059,"owners_count":19783453,"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":["components","css","primitives","prism","react","reactnative","ui"],"created_at":"2024-11-09T16:33:30.587Z","updated_at":"2025-02-23T13:52:52.778Z","avatar_url":"https://github.com/tmpfs.png","language":"JavaScript","readme":"\u003ch1 align=\"center\"\u003ePrism Primitives\u003c/h1\u003e\n\u003cp align=\"center\"\u003eReact Native primitives for \u003ca href=\"https://github.com/tmpfs/prism\"title=\"Prism\"\u003ePrism\u003c/a\u003e\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"256\" height=\"256\" src=\"https://raw.githubusercontent.com/tmpfs/prism/master/prism.png\" /\u003e\n\u003c/p\u003e\n\n---\n\n- [Installation](#installation)\n- [Synopsis](#synopsis)\n- [Getting Started](#getting-started)\n- [Implementation](#implementation)\n- [Notes](#notes)\n- [License](#license)\n\n---\n\n## Installation\n\nUse your preferred package manager for installation.\n\n```\nnpm i --save react-native-prism-primitives\nyarn add react-native-prism-primitives\n```\n\n## Synopsis\n\nReact Native primitives integrated with [Prism](https://github.com/tmpfs/prism) designed to reduce the cognitive load during migration or integration.\n\nThis library exposes all the React Native visual components wrapped using the `Prism()` function. Class names are identical so it is a drop-in replacement.\n\nThe API is considered locked and changes will only be made for bugs or if the underlying RN components being tracked change.\n\nBug fixes will be released under patch versions, new RN components under minor releases and major changes to the underlying RN components (deletions) will be tracked via major version releases.\n\n## Getting Started\n\nConfigure your application (see the Prism [Getting Started](https://github.com/tmpfs/prism#getting-started) guide) and then you can import your visual components from `react-native-prism-primitives` to use the [Prism Properties](https://github.com/tmpfs/prism#properties) in your application.\n\n```javascript\nimport {\n  Text,\n  View\n} from 'react-native-prism-primitives'\n```\n\nYou can now define default style declarations for the primitive components in your style sheet:\n\n```javascript\nexport default {\n  styles: ({colors, fonts}) =\u003e {\n    return {\n      'Text': {\n        color: 'green'\n      },\n      'View': {\n        flex: 1\n      }\n    }\n  }\n}\n```\n\nAnd use the style property shortcuts (assuming they are enabled):\n\n```html\n\u003cView background='steelblue' padding={10} margin={20}\u003e\n  \u003cText color='white'\u003e\n    Example\n  \u003c/Text\u003e\n\u003c/View\u003e\n```\n\n## Implementation\n\nThe components are very thin wrappers around the RN components and do not add any extra functionality apart from that enabled by [Prism](https://github.com/tmpfs/prism).\n\n```javascript\nimport React, {Component} from 'react'\nimport {Text as NativeText} from 'react-native'\nimport {Prism} from 'react-native-prism'\n\nclass Text extends Component {\n\n  static styleName = 'Text'\n  static propTypes = NativeText.propTypes\n\n  render () {\n    return (\n      \u003cNativeText {...this.props}\u003e\n        {this.props.children}\n      \u003c/NativeText\u003e\n    )\n  }\n}\n\nexport default Prism(Text)\n```\n\n## Notes\n\nThis library only exposes the *visual components*. API components (such as `Platform`) should still be imported directly from `react-native`.\n\n## License\n\nMIT\n\n---\n\nCreated by [mkdoc](https://github.com/mkdoc/mkdoc) on June 18, 2018\n\n[prism]: https://github.com/tmpfs/prism\n[getting started]: https://github.com/tmpfs/prism#getting-started\n[prism properties]: https://github.com/tmpfs/prism#properties\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmpfs%2Fprism-primitives","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftmpfs%2Fprism-primitives","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmpfs%2Fprism-primitives/lists"}