{"id":19376581,"url":"https://github.com/gavinray97/expo-react-native-shadow","last_synced_at":"2025-04-23T18:33:23.127Z","repository":{"id":114756606,"uuid":"145265335","full_name":"GavinRay97/expo-react-native-shadow","owner":"GavinRay97","description":null,"archived":false,"fork":false,"pushed_at":"2019-09-18T11:03:15.000Z","size":10,"stargazers_count":9,"open_issues_count":3,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-06T07:18:51.191Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/GavinRay97.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}},"created_at":"2018-08-19T01:52:44.000Z","updated_at":"2024-03-18T00:35:24.000Z","dependencies_parsed_at":"2023-07-15T04:46:06.936Z","dependency_job_id":null,"html_url":"https://github.com/GavinRay97/expo-react-native-shadow","commit_stats":{"total_commits":6,"total_committers":1,"mean_commits":6.0,"dds":0.0,"last_synced_commit":"5e450f5c6b5f7178f903be7524562892506c39a8"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GavinRay97%2Fexpo-react-native-shadow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GavinRay97%2Fexpo-react-native-shadow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GavinRay97%2Fexpo-react-native-shadow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GavinRay97%2Fexpo-react-native-shadow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GavinRay97","download_url":"https://codeload.github.com/GavinRay97/expo-react-native-shadow/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223932183,"owners_count":17227277,"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":[],"created_at":"2024-11-10T08:44:26.498Z","updated_at":"2024-11-10T08:44:27.074Z","avatar_url":"https://github.com/GavinRay97.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# expo-react-native-shadow\n[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url]\n---\n\nThis is a port of [`react-native-shadow`](https://github.com/879479119/react-native-shadow) that is **compatible with Expo** and replaces the react-native-svg tags in React Native Shadow with Expo's SVG API. **That means no ejecting!**\n\nThe documentation is the same as `react-native-shadow`'s:\n\n![Demo](http://7xsm7w.com1.z0.glb.clouddn.com/20161015151531.png)\n\n## HOW TO USE IT\n\n### Installation\nyou must run the command to install the plugin and its dependences in you project\n```bash\nyarn add expo-react-native-shadow\n``` \n\n### Implementation\n\n1. `import { BoxShadow, BorderShadow } from 'expo-react-native-shadow'`\n\n2. Create a styles/options object:\n```js\nconst shadowStyle = {\n  width: 100,\n  height: 100,\n  color: \"#000\",\n  border: 2,\n  radius: 3,\n  opacity: 0.2,\n  x: 0,\n  y: 3,\n  style: { marginVertical: 5 },\n}\n```\n\n3. Wrap your component in `BoxShadow` or `BorderShadow`, passing in the `shadowStyle` object:\n```js\nimport React, { Component } from 'react'\nimport { TouchableHighlight } from 'react-native'\nimport { BoxShadow } from 'expo-react-native-shadow'\n\nconst buttonStyle = {\n  position: \"relative\",\n  width: 160,\n  height: 170,\n  backgroundColor: \"#fff\",\n}\n\nconst shadowStyle = {\n  width: buttonStyle.width,\n  height: buttonStyle.height,\n  color: \"#000\",\n  border: 2,\n  radius: 3,\n  opacity: 0.2,\n  x: 0,\n  y: 3,\n  style: { marginVertical: 5 }\n}\n\nexport default class VideoCell extends Component {\n  render = () =\u003e {\n    return (\n      \u003cBoxShadow setting={shadowStyle}\u003e\n        \u003cTouchableHighlight style={buttonStyle} /\u003e\n      \u003c/BoxShadow\u003e\n    )\n  }\n}\n```\n\n## Styles API\n\n### BoxShadow\n+ **width**: Must be set to the same value as the child component.\n+ **height**: Must be set to the same value as the child component.\n+ **color**: Color of shadow. **RGBA is not supported, however you may use the opacity property.**\n+ **border**: Width of the shadow, cannot be a negative number.\n+ **radius**: Should be set to the `borderRadius` of child component.\n+ **opacity**: the `opacity` of the shadow.\n+ **x**: The `offsetX` of the shadow\n+ **y**: The `offsetY` of the shadow\n+ **style**: A styles object to be applied to the wrapping `\u003cView\u003e` tag of the SVG component.\n\n### BorderShadow\n+ **width**: Same as above.\n+ **color**: Same as above. \n+ **border**: Same as above.\n+ **opacity**: Same as above.\n+ **style**: Same as above.\n+ **side**: `\"top\"` or `\"bottom\"` - Display position of the border shadow.\n+ **inset**: `true` or `false` - This is similar to CSS - `shadow: color inset`\n\n\n[npm-url]: https://npmjs.org/package/expo-react-native-shadow\n[downloads-image]: http://img.shields.io/npm/dm/expo-react-native-shadow.svg\n[npm-image]: http://img.shields.io/npm/v/expo-react-native-shadow.svg\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgavinray97%2Fexpo-react-native-shadow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgavinray97%2Fexpo-react-native-shadow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgavinray97%2Fexpo-react-native-shadow/lists"}