NativeScript-Snackbar 🍭 🍫 🍦
NativeScript plugin for Material Design Floating Action Button UI component.
Demo
Installation
tns plugin add nativescript-snackbar
Changelog
Usage
TS
; // Create an instance of SnackBar; /// Show a simple snackbar with no actionspublic showSimple /// Show an Action snack barpublic showAction
API
Show a simple SnackBar (color args will only work on Android)
- simple(snackText: string, textColor?: string, backgroundColor?: string, maxLines?: number, isRTL?: boolean, view?: View): Promise
Show a SnackBar with Action.
- action(options: SnackBarOptions): Promise
Manually dismiss an active SnackBar
- dismiss(): Promise
SnackBarOptions Interface
- actionText: string
- actionTextColor: string
- snackText: string
- hideDelay: number
- textColor: string
- backgroundColor: string
- maxLines: number
- isRTL: boolean
- view: View