{"id":15141955,"url":"https://github.com/edusperoni/nativescript-ripple","last_synced_at":"2025-09-05T04:33:01.455Z","repository":{"id":38470136,"uuid":"63099271","full_name":"edusperoni/nativescript-ripple","owner":"edusperoni","description":"NativeScript plugin to add Android Material Design Ripple effect to your layouts.","archived":false,"fork":false,"pushed_at":"2022-12-06T23:43:53.000Z","size":6155,"stargazers_count":52,"open_issues_count":15,"forks_count":13,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-08-17T08:27:09.886Z","etag":null,"topics":["android","material-design","nativescript","nativescript-plugin","ripple","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/edusperoni.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":"2016-07-11T20:20:38.000Z","updated_at":"2024-05-30T15:49:44.000Z","dependencies_parsed_at":"2023-01-24T12:30:40.995Z","dependency_job_id":null,"html_url":"https://github.com/edusperoni/nativescript-ripple","commit_stats":null,"previous_names":["bradmartin/nativescript-ripple"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/edusperoni/nativescript-ripple","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edusperoni%2Fnativescript-ripple","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edusperoni%2Fnativescript-ripple/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edusperoni%2Fnativescript-ripple/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edusperoni%2Fnativescript-ripple/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/edusperoni","download_url":"https://codeload.github.com/edusperoni/nativescript-ripple/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edusperoni%2Fnativescript-ripple/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273713347,"owners_count":25154608,"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","status":"online","status_checked_at":"2025-09-05T02:00:09.113Z","response_time":402,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["android","material-design","nativescript","nativescript-plugin","ripple","typescript"],"created_at":"2024-09-26T09:21:03.222Z","updated_at":"2025-09-05T04:32:56.388Z","avatar_url":"https://github.com/edusperoni.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nativescript-Ripple\n\nThis plugin aims to bring a native (or close to native) ripple implementation on Android and iOS. The android version uses a `RippleDrawable` and conserves the previous background, as well as CSS styles.\n\n## Installation\n\n```javascript\ntns plugin add nativescript-ripple\n```\n## Usage \n\nThis will only work on Android Lollipop 5.0 or later and any version of iOS.\n\n### XML\n\n**ENSURE TO BIND A TAP LISTENER TO THE CHILD ELEMENT, OR THIS WON'T WORK ON ANDROID**\n\n```html\n\u003cPage class=\"page\"\n    navigatingTo=\"onNavigatingTo\" \n    xmlns=\"http://schemas.nativescript.org/tns.xsd\"\n    xmlns:RL=\"nativescript-ripple\"\u003e\n    \u003cActionBar class=\"action-bar\"\u003e\u003cLabel class=\"action-bar-title\" text=\"Home\"\u003e\u003c/Label\u003e\u003c/ActionBar\u003e\n    \u003cScrollView\u003e\n        \u003cStackLayout\u003e\n            \u003cRL:Ripple rippleColor=\"#d50000\"\u003e\n                \u003cLabel text=\"Red Ripples!!!\" class=\"message\" textWrap=\"true\" tap=\"dummy\" /\u003e\n            \u003c/RL:Ripple\u003e\n\n            \u003cRL:Ripple rippleColor=\"#fff000\"\u003e\n                \u003cImage src=\"~/home/images/batman.png\" margin=\"10\" stretch=\"aspectFit\" tap=\"dummy\"/\u003e\n            \u003c/RL:Ripple\u003e\n\n            \u003cRL:Ripple\u003e\n                \u003cLabel text=\"Default Ripple\" class=\"message\" textWrap=\"true\" tap=\"dummy\"/\u003e\n            \u003c/RL:Ripple\u003e\n\n            \u003cRL:Ripple rippleColor=\"#fff\"\u003e\n                \u003cGridLayout backgroundColor=\"#FF4081\" borderRadius=\"30\" height=\"60\" width=\"60\" tap=\"dummy\"\u003e\n                    \u003cLabel text=\"B\" fontSize=\"30\" color=\"#fff\" verticalAlignment=\"center\" horizontalAlignment=\"center\" textWrap=\"true\"/\u003e\n                \u003c/GridLayout\u003e\n            \u003c/RL:Ripple\u003e\n\n            \u003cRL:Ripple rippleColor=\"#c8c8c8\"\u003e\n                \u003cLabel class=\"label-button\" text=\"Lighter Ripple\" textWrap=\"true\" tap=\"dummy\"/\u003e\n            \u003c/RL:Ripple\u003e\n\n            \u003cRL:Ripple rippleColor=\"#f5f5f5\"\u003e\n                \u003cLabel text=\"Possibilities\" color=\"#fff\" padding=\"10\" textWrap=\"true\" tap=\"tapEvent\" class=\"dark-button\"/\u003e\n            \u003c/RL:Ripple\u003e\n\n        \u003c/StackLayout\u003e\n    \u003c/ScrollView\u003e\n\u003c/Page\u003e\n```\n\n### Ripple Options\n\n`rippleColor` sets the ripple color. Examples: `\"#ffffff\"` | `\"rgba(255,255,255,0.5)\"`.\n\n`rippleColorAlpha` sets the ripple color alpha (multiplicative). Default: `0.25`. **NOTE:** This is multiplicative to a 0.5 alpha given by the native class `RippleDrawable`. This same value is hardcoded in iOS to make both platforms behave the same.\n\n`rippleLayer` sets the layer the ripple is applied to (**ANDROID ONLY**). Allowed values: `foreground` (default on API\u003e=23) | `background`. Setting this to `background` will make the ripple only appear on the View's background (meaning it won't appear in front of an image, for example).\n\n`rippleEnabled` can be set to \"false\" (`rippleEnabled=\"false\"`) to disable the ripple. This will also disable ripple effects on Views that have them natively (like `Button`).\n\n### Angular\n\n#### Import the NgRippleModule\n\nIf you're using other modules that change the background (like https://github.com/Especializa/nativescript-ng-shadow), ensure to import it LAST, otherwise the Ripple background will be overwritten.\n\n```\t\nimport { NgRippleModule } from 'nativescript-ripple/angular';\n\n@NgModule({\n    imports: [\n        NgRippleModule,\n        // ...\n    ],\n    // ...\n})\nexport class MyModule { }\n```\n\n#### Use it in the templates:\n\n**ENSURE TO BIND A TAP LISTENER, OR THIS WON'T WORK ON ANDROID**\n\n```\u003cLabel ripple text=\"my label text\" (tap)=\"tapfn()\"\u003e\u003c/Label\u003e```\n\n```html\n\u003cStackLayout ripple rippleColor=\"#00ff00\" style=\"padding: 30; border-radius: 10;\" (tap)=\"tapfn()\"\u003e\n\u003cLabel text=\"this is inside the layout!\"\u003e\u003c/Label\u003e\n\u003c/StackLayout\u003e\n```\n\n#### Implementation details\n\nOn Android, if the view does not have a background, we assign a transparent one. Otherwise, turning the screen off and then on again makes the background the same as the mask color (black).\n\n### Ripple Options\n\n`rippleColor` sets the ripple color. Examples: `\"#ffffff\"` | `\"rgba(255,255,255,0.5)\"`.\n\n`rippleColorAlpha` sets the ripple color alpha (multiplicative). Default: `0.25`. **NOTE:** This is multiplicative to a 0.5 alpha given by the native class `RippleDrawable`. This same value is hardcoded in iOS to make both platforms behave the same.\n\n`rippleLayer` sets the layer the ripple is applied to (**ANDROID ONLY**). Allowed values: `foreground` (default on API\u003e=23) | `background`. Setting this to `background` will make the ripple only appear on the View's background (meaning it won't appear in front of an image, for example).\n\n`ripple` can be set to \"off\" (`ripple=\"off\"`) to disable the ripple. This will also disable ripple effects on Views that have them natively (like `Button`).\n\n### Known Issues\n\n#### No Ripple on Android\n\nIf your Ripple is not working on Android, try the following:\n\n1. Verify the view you're applying the Ripple to has a `tap` event\n2. If the view is a Text-like view (Buttons, Labels, etc), there is a bug that prevents any `foreground` to be applied to it when `textWrap` is not `true` and `textAlignment` is `center` or `right`. There are many fixes (only one is needed):\n    1. Wrap the View in another layout (like a `GridLayout`)\n    2. Change the `rippleLayer` to `background`\n    3. Use `textWrap=\"true\"`\n    4. Disable `HorizontallyScrolling` for your View (`yourLabel.android.setHorizontallyScrolling(false);`). Warning: this is set to true every time `textAlignment` changes\n\n    \n## License\n\nApache License Version 2.0, January 2004\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedusperoni%2Fnativescript-ripple","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedusperoni%2Fnativescript-ripple","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedusperoni%2Fnativescript-ripple/lists"}