All Projects → EddyVerbruggen → Nativescript Feedback

EddyVerbruggen / Nativescript Feedback

Licence: mit
📢 Non-blocking textual feedback for your NativeScript app

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Nativescript Feedback

Fftoast
A very powerful iOS message notifications and AlertView extensions. It can be easily realized from the top of the screen, the bottom of the screen and the middle of the screen pops up a notification. You can easily customize the pop-up View.
Stars: ✭ 649 (+411.02%)
Mutual labels:  message, toast, notification
Toast
To use it in PCL or .NetStandard projects write this line of code : CrossToastPopUp.Current.ShowToastMessage("Message");
Stars: ✭ 51 (-59.84%)
Mutual labels:  toast, message, notification
Bot toast
A really easy to use flutter toast library
Stars: ✭ 551 (+333.86%)
Mutual labels:  toast, notification
Gsmessages
A simple style messages/notifications, in Swift.
Stars: ✭ 595 (+368.5%)
Mutual labels:  message, toast
Anylayer
Android稳定高效的浮层创建管理框架
Stars: ✭ 745 (+486.61%)
Mutual labels:  toast, notification
toast-swift
A Swift Toast view - iOS 14 style and newer - built with UIKit. 🍞
Stars: ✭ 85 (-33.07%)
Mutual labels:  toast, notification
Multiplatform-Bus
Kotlin event-bus compatible with Android & native iOS
Stars: ✭ 43 (-66.14%)
Mutual labels:  message, notification
Swiftentrykit
SwiftEntryKit is a presentation library for iOS. It can be used to easily display overlays within your iOS apps.
Stars: ✭ 5,706 (+4392.91%)
Mutual labels:  notification, banner
SimpleToast
SimpleToast is a simple, lightweight, flexible and easy to use library to show toasts / popup notifications inside iOS or MacOS applications in SwiftUI. Because of the flexibility to show any content it is also possible to use the library for showing simple modals.
Stars: ✭ 131 (+3.15%)
Mutual labels:  toast, notification
Ajmessage
Simple popup message
Stars: ✭ 30 (-76.38%)
Mutual labels:  message, notification
React Toastify
React notification made easy 🚀 !
Stars: ✭ 8,113 (+6288.19%)
Mutual labels:  toast, notification
Nativescript Admob
NativeScript plugin to earn some precious 💰💰 with ads by Google AdMob
Stars: ✭ 64 (-49.61%)
Mutual labels:  nativescript, banner
denbun
Adjust showing frequency of Android app messages, and to be more user friendly 🐦
Stars: ✭ 17 (-86.61%)
Mutual labels:  toast, notification
React Cool Portal
😎 🍒 React hook for Portals, which renders modals, dropdowns, tooltips etc. to <body> or else.
Stars: ✭ 458 (+260.63%)
Mutual labels:  toast, notification
marketplace-feedback
This repository is for feedback regarding NativeScript Marketplace. Use the issues system here to submit feature requests, vote for existing ones or report bugs.
Stars: ✭ 16 (-87.4%)
Mutual labels:  feedback, nativescript
Customalertviewdialogue
Custom AlertView Dialogue is the world's most advanced alert view library. Custom AlertView Dialogue includes simple message popups, confirmation alerts, selector popups, action sheet bottom menus, and input/feedback contact forms.
Stars: ✭ 100 (-21.26%)
Mutual labels:  feedback, message
nativescript-taptic-engine
📳 Use Apple's Taptic Engine to vibrate your iPhone 6s (and up) in a variety of ways
Stars: ✭ 16 (-87.4%)
Mutual labels:  feedback, nativescript
MaterialToast
A fully and highly customizable material designed Toast for Android.
Stars: ✭ 31 (-75.59%)
Mutual labels:  toast, notification
Notie
🔔 a clean and simple notification, input, and selection suite for javascript, with no dependencies
Stars: ✭ 6,170 (+4758.27%)
Mutual labels:  toast, notification
Reapop
📮 A simple and customizable React notifications system
Stars: ✭ 1,155 (+809.45%)
Mutual labels:  toast, notification

NativeScript Feedback

Build Status NPM version Downloads Twitter Follow

💡 Plugin version 2.0.0+ is compatible with NativeScript 7+. If you need to target older NativeScript versions, please stick to plugin version 1.5.0.

       

iOS and Android running the included demo - much better framerate on YouTube!

Demo apps

NativeScript-Core (XML)

Check out the demo folder. This is how to clone and run it:

git clone https://github.com/EddyVerbruggen/nativescript-feedback
cd nativescript-feedback/src
npm run demo.ios # or demo.android

NativeScript-Angular

This plugin is part of the plugin showcase app I built using Angular.

NativeScript-Vue

Check out the demo-vue folder. This is how to clone and run it:

git clone https://github.com/EddyVerbruggen/nativescript-feedback
cd nativescript-feedback/src
npm run demo-vue.ios # or demo-vue.android

Installation

tns plugin add nativescript-feedback

API

requiring / importing the plugin

JavaScript

var FeedbackPlugin = require("nativescript-feedback");
var feedback = new FeedbackPlugin.Feedback();

TypeScript

import { Feedback, FeedbackType, FeedbackPosition } from "nativescript-feedback";

export class MyClassWithFeedback {
  private feedback: Feedback;
  
  constructor() {
    this.feedback = new Feedback();
  }
}

show

Showing feedback can be as easy as:

this.feedback.show({
  message: "Easiest thing ever, right?"
});

That uses a bunch of sane defaults. However, there are a lot of things you may want to tweak. All of which are optional:

Property Default Description
title undefined The bold title at the top.
titleColor new Color("white") The title's color.
titleFont Bold system font iOS needs the font name and android the file name. See the demo for examples.
titleSize 16 The size of the title font.
message undefined The message below the title.
messageColor new Color("white") The message's color.
messageFont System font iOS needs the font name and android the file name. See the demo for examples.
messageSize 13 The size of the message font.
duration 4000 The duration to show the feedback (milliseconds).
type FeedbackType.Custom One of .Custom, .Success, .Warning, .Error, .Info. Each with a distinct style as show in the animations above. You can still override all other properties according to your liking.
position FeedbackPosition.Top Either .Top or .Bottom.
backgroundColor Depends on the type The background's color.
icon Depends on the type A custom icon shown on the left. Loaded from App_Resources/<platform> folders. Example here. Want no icon at all? Don't set a type.
android.iconColor See description On iOS the icon color is as-is, but on Android it's white. Set this color to override the latter (also see the TypeScript example below).
android.iconPulseEnabled true On Android you can disable the pulsating effect of the icon.
onTap undefined A callback function that gets invoked when the user tapped your feedback.
onShow undefined A callback for when the feedback is shown. iOS note: is called twice: once when animating and once when done.
onHide undefined A callback for when the feedback is hidden.

One of the examples in the demo app shows a custom icon and alternative colors. You'd get there by doing:

JavaScript

var FeedbackType = require ("nativescript-feedback").FeedbackType;
var FeedbackPosition = require ("nativescript-feedback").FeedbackPosition;
var color = require("color");

this.feedback.show({
  title: "Thumbs up!",
  titleColor: new color.Color("#222222"),
  position: FeedbackPosition.Bottom, // iOS only
  type: FeedbackType.Custom, // this is the default type, by the way
  message: "Custom colors and icon. Loaded from the App_Resources folder.",
  messageColor: new color.Color("#333333"),
  duration: 3000,
  backgroundColor: new color.Color("yellowgreen"),
  icon: "customicon", // in App_Resources/platform folders
  onTap: function() { console.log("showCustomIcon tapped") },
  onShow: function(animating) { console.log(animating ? "showCustomIcon animating" : "showCustomIcon shown") },
  onHide: function() { console.log("showCustomIcon hidden") }
});

TypeScript

import { FeedbackType, FeedbackPosition } from "nativescript-feedback";
import { Color } from "tns-core-modules/color";

this.feedback.show({
  title: "Thumbs up!",
  titleColor: new Color("#222222"),
  position: FeedbackPosition.Bottom,
  type: FeedbackType.Custom, // this is the default type, by the way
  message: "Custom colors and icon. Loaded from the App_Resources folder.",
  messageColor: new Color("#333333"),
  duration: 3000,
  backgroundColor: new Color("yellowgreen"),
  icon: "customicon", // in App_Resources/platform folders
  android: {
    iconColor: new Color("#222222") // optional, leave out if you don't need it
  },
  onTap: () => console.log("showCustomIcon tapped"),
  onShow: animating => console.log(animating ? "showCustomIcon animating" : "showCustomIcon shown"),
  onHide: () => console.log("showCustomIcon hidden")
});

hide

Hiding a message can be done automatically (see duration), by a gesture (tap / swipe), or programmatically as shown here:

this.feedback.hide();

Convenience functions

Since in many cases you want to only show success / info / warning / error messages anyway, this plugin's got you covered. You can call any of these functions and still pass in any of the aforementioned properties to tweak it to your liking:

success

this.feedback.success({
  title: "Awesome",
  message: "That was great!"
});

info

this.feedback.info({
  title: "Info <> Data",
  message: "Info is relevant data, not just any data."
});

warning

this.feedback.warning({
  message: "Your battery is almost empty"
});

error

this.feedback.error({
  title: "KABOoooOOM!",
  titleColor: new Color("black")
});

Credits

On Android we're using the Alerter library by Tapadoo, and on iOS ISMessages by ilyainyushin.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].