{"id":25127676,"url":"https://github.com/kurucaner/smooth-push","last_synced_at":"2025-04-23T14:34:11.078Z","repository":{"id":272520962,"uuid":"916873718","full_name":"kurucaner/smooth-push","owner":"kurucaner","description":"Smooth Push: Lightweight Toast Notifications Inspired by Push Notifications for React Native","archived":false,"fork":false,"pushed_at":"2025-04-06T16:25:54.000Z","size":1597,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-19T00:51:21.786Z","etag":null,"topics":["expo","notification","react-native","smooth","toast"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/smooth-push","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/kurucaner.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}},"created_at":"2025-01-14T23:14:42.000Z","updated_at":"2025-04-06T16:25:58.000Z","dependencies_parsed_at":"2025-01-15T14:54:22.928Z","dependency_job_id":"a1f04b24-3300-4078-82fc-29de38f82eaa","html_url":"https://github.com/kurucaner/smooth-push","commit_stats":null,"previous_names":["kurucaner/smooth-toast","kurucaner/smooth-push"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kurucaner%2Fsmooth-push","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kurucaner%2Fsmooth-push/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kurucaner%2Fsmooth-push/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kurucaner%2Fsmooth-push/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kurucaner","download_url":"https://codeload.github.com/kurucaner/smooth-push/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250452590,"owners_count":21433049,"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":["expo","notification","react-native","smooth","toast"],"created_at":"2025-02-08T11:17:44.945Z","updated_at":"2025-04-23T14:34:11.059Z","avatar_url":"https://github.com/kurucaner.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Smooth Push\n\nA smooth, gesture-based toast notification component for React Native.\n\n\u003cimg src=\"./docs/preview.gif\" width=\"300\" alt=\"Smooth Push Preview\"\u003e\n\n## Features\n\n- 🎨 Beautiful, minimal design with translucent effect\n- 👆 Gesture support (swipe to dismiss)\n- 🎯 Highly customizable\n- 💫 Smooth animations\n- 📱 iOS and Android support\n- 🌓 Light/Dark mode compatible\n\n## Installation\n\n```bash\nnpm install smooth-push\n```\n\n### Required Dependencies\n\nThis package requires the following peer dependencies:\n\n```bash\nnpm install react-native-reanimated react-native-gesture-handler\n```\n\n## Setup\n\n### 1. Configure Reanimated\n\nAdd Reanimated's Babel plugin to your `babel.config.js`:\n\n```js\nplugins: [\n  'react-native-reanimated/plugin',\n],\n```\n\n### 2. Wrap Your App with GestureHandlerRootView and import SmoothPushProvider\n\nIn your app's root component (usually `App.js` or `_layout.tsx`), wrap your entire app with `GestureHandlerRootView`:\n\n```js\nimport { GestureHandlerRootView } from \"react-native-gesture-handler\";\nimport { SmoothPushProvider } from \"smooth-push\";\n\nexport default function App() {\n  return (\n    \u003cGestureHandlerRootView style={{ flex: 1 }}\u003e\n      \u003cSmoothPushProvider /\u003e\n      {/* Your app components go here */}\n    \u003c/GestureHandlerRootView\u003e\n  );\n}\n```\n\n### 3. Use SmoothPushProvider in Your App\n\nNow you can use the `show` function to display toast notifications:\n\n```js\nimport { show } from \"smooth-push\";\n// Basic usage\nshow({\n  toastType: \"success\",\n  message: \"Operation completed successfully\",\n});\n// With custom configuration\nshow({\n  toastType: \"error\",\n  message: \"Something went wrong\",\n  config: {\n    duration: 3000,\n    position: \"bottom\",\n    offset: 40,\n  },\n});\n```\n\n## Configuration\n\nYou can customize the toast notifications in two ways:\n\n1. Default configuration through the `SmoothPushProvider`\n2. Per-notification configuration when calling `show()`\n\n### Provider Configuration\n\n```js\n\u003cSmoothPushProvider\n  defaultConfig={{\n    duration: 5000,\n    position: \"top\",\n    offset: 60,\n    maxWidth: 400,\n    blurIntensity: 50,\n    containerStyle: {},\n    textStyle: {},\n    onPress: () =\u003e {},\n    onClose: () =\u003e {},\n  }}\n/\u003e\n```\n\n### Available Options\n\n| Property       | Type              | Default   | Description                                  |\n| -------------- | ----------------- | --------- | -------------------------------------------- |\n| duration       | number            | 6000      | Duration in milliseconds before auto-dismiss |\n| position       | 'top' \\| 'bottom' | 'top'     | Toast position on screen                     |\n| offset         | number            | 60        | Distance from top/bottom edge                |\n| maxWidth       | number            | 400       | Maximum width of toast                       |\n| blurIntensity  | number            | 50        | Intensity of blur effect                     |\n| containerStyle | ViewStyle         | {}        | Custom styles for container                  |\n| textStyle      | TextStyle         | {}        | Custom styles for text                       |\n| onPress        | () =\u003e void        | undefined | Callback when toast is pressed               |\n| onClose        | () =\u003e void        | undefined | Callback when toast is dismissed             |\n| swipeThreshold | number            | -55       | Threshold for swipe to dismiss               |\n| stickColor     | string            | \"#ffcad4\" | Color of the bottom indicator stick         |\n\n## Types\n\n```ts\ntype SmoothPushType = \"success\" | \"error\" | \"none\";\n\ninterface NotificationConfig {\n  duration?: number;\n  position?: \"top\" | \"bottom\";\n  offset?: number;\n  maxWidth?: number;\n  blurIntensity?: number;\n  containerStyle?: ViewStyle;\n  textStyle?: TextStyle;\n  onPress?: () =\u003e void;\n  onClose?: () =\u003e void;\n  swipeThreshold?: number;\n  stickColor?: string;\n}\n\ninterface ShowNotification {\n  toastType: SmoothPushType;\n  message: string;\n  config?: NotificationConfig;\n}\n```\n\n## License\n\nMIT\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkurucaner%2Fsmooth-push","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkurucaner%2Fsmooth-push","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkurucaner%2Fsmooth-push/lists"}