{"id":15062525,"url":"https://github.com/codigami/react-native-alert-view","last_synced_at":"2026-03-09T13:05:13.045Z","repository":{"id":55615355,"uuid":"88042839","full_name":"Codigami/react-native-alert-view","owner":"Codigami","description":"An alert view wrapper built on top of native components for iOS and Android with customizable controls for making extremely unique alerts and action sheets.","archived":false,"fork":false,"pushed_at":"2017-05-01T19:30:30.000Z","size":89,"stargazers_count":9,"open_issues_count":2,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-08T05:56:24.306Z","etag":null,"topics":["actionsheet","actionsheet-component","alert","alertview","alertviewcontroller","android","ios","react","react-component","react-components","react-native","react-native-component"],"latest_commit_sha":null,"homepage":"","language":"Objective-C","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/Codigami.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}},"created_at":"2017-04-12T11:09:49.000Z","updated_at":"2019-12-13T01:29:00.000Z","dependencies_parsed_at":"2022-08-15T04:31:20.631Z","dependency_job_id":null,"html_url":"https://github.com/Codigami/react-native-alert-view","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Codigami%2Freact-native-alert-view","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Codigami%2Freact-native-alert-view/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Codigami%2Freact-native-alert-view/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Codigami%2Freact-native-alert-view/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Codigami","download_url":"https://codeload.github.com/Codigami/react-native-alert-view/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248225711,"owners_count":21068078,"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":["actionsheet","actionsheet-component","alert","alertview","alertviewcontroller","android","ios","react","react-component","react-components","react-native","react-native-component"],"created_at":"2024-09-24T23:42:11.317Z","updated_at":"2026-03-09T13:05:12.992Z","avatar_url":"https://github.com/Codigami.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Native Alert View\n\nReact Native Alert View is a react native wrapper for [CFAlertViewController](https://github.com/Codigami/CFAlertViewController) iOS component that we use at [Crowdfire](https://crowdfireapp.com)\n\nThis library currently supports only iOS but android support is coming very soon.\n\n\n# Installation\n\n1. Install `react-native-alert-view` from npm\n\n    `yarn add react-native-alert-view` OR `npm install --save react-native-alert-view`\n\n2. Setup your project to use the installed library\n\n    ## Install using Cocoapods (recommended)\n\n    We assume that your Cocoapods is already configured. If you are new to Cocoapods, have a look at the [documentation](https://guides.cocoapods.org/)\n\n    - Add `pod 'react-native-alert-view', :path =\u003e '../node_modules/react-native-alert-view'` to your Podfile.\n      This will \n    - Install the pod(s) by running `pod install` in terminal (in folder where Podfile file is located).\n\n    ## Install using source\n\n    - Install `CFAlertViewController` in your project using the instructions here: https://github.com/Codigami/CFAlertViewController#install-using-source-file\n    - Install `RNAlertView` in your project using the same instructions\n\n\n# Options\n\nReact Native Alert View only supports a subset of functionalities provided by CFAlertViewController. It exposes a method `show` which can be used as:\n\n```\nReactNativeAlertView.show(options, callback)\n```\n\n\n## Suported options\n\n#### Alert options\n\n| Option         | Type   | Allowed values                             | Default | Platform support                                                                                                                          |\n|----------------|--------|--------------------------------------------|---------|-------------------------------------------------------------------------------------------------------------------------------------------|\n| title          | string | Any string                                 | `''`    | Supported on iOS/Android                                                                                                                  |\n| message        | string | Any string                                 | `''`    | Supported on iOS/Android                                                                                                                  |\n| preferredStyle | string | One of `actionSheet`/`alert`               | `alert` | iOS: Supports both Android: Defaults to `alert`. Option is ignored                                                                        |\n| textAlignment  | string | One of `left`/`right`/`center`             | `left`  | iOS: Supports all values Android: Defaults to `left`. Option is ignored                                                                   |\n| buttons        | Array  | List of `button`'s                         | `[]`    | iOS: Supports multiple buttons Android: Requires 2 buttons. First button is used for a positive action. Second one for a positive action. |\n\n#### Button options\n\n| Option          | Type   | Allowed values                                                                       | Default     | Platform support                                                             |\n|-----------------|--------|--------------------------------------------------------------------------------------|-------------|------------------------------------------------------------------------------|\n| title           | string | Any string                                                                           | `''`        | Supported on iOS/Android                                                     |\n| style           | string | One of `default`/`cancel`/`destructive`                                             | `default`   | iOS: Supports all values Android: Defaults to `default`. Option is ignored   |\n| alignment       | string | One of `left`/`right`/`center`/`justified`                                           | `justified` | iOS: Supports all values Android: Defaults to `justified`. Option is ignored |\n| backgroundColor | string | Any color supported [here](https://facebook.github.io/react-native/docs/colors.html) | `white`     | Supported on iOS/Android                                                     |\n| textColor       | string | Any color supported [here](https://facebook.github.io/react-native/docs/colors.html) | `white`     | Supported on iOS/Android                                                     |\n\n\n# Usage \n\n```\nimport React from 'react';\nimport { Text, TouchableOpacity } from 'react-native';\nimport ReactNativeAlertView from 'react-native-alert-view'\n\nconst TestComponent = React.createClass({\n  show() {\n    ReactNativeAlertView.show({\n      title: 'title',\n      message: 'message',\n      preferredStyle: 'actionSheet',\n      textAlignment: 'center',\n      buttons: [{\n        title: 'string 1',\n        style: 'destructive',\n        alignment: 'center',\n        backgroundColor: '#123456',\n      }, {\n        title: 'string 2',\n        style: 'default',\n        alignment: 'justified',\n        backgroundColor: '#234989',\n        textColor: 'yellow'\n      }]\n    }, (index) =\u003e {\n      alert(`Button with index ${index} tapped`);\n    });\n  },\n\n  render() {\n    return (\n      \u003cTouchableOpacity onPress={this.show} style={{marginTop: 20}}\u003e\n        \u003cText\u003eClick to show alert view\u003c/Text\u003e\n      \u003c/TouchableOpacity\u003e\n    );\n  }\n});\n\nexport default TestComponent;\n\n```\n\n# License\n\nMIT © 2017 Crowdfire Inc.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodigami%2Freact-native-alert-view","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodigami%2Freact-native-alert-view","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodigami%2Freact-native-alert-view/lists"}