Notification

January 16, 2023 ยท View on GitHub

Notification component can be used to enhance the user experience with charming animation when message arrive.

๐ŸŽฌ Preview


Notification
alt tag

Default Usage


import React from 'react';
import { View, StyleSheet } from 'react-native';
import { Notification } from 'react-native-skia-catalog';

const NotificationScreen = () => (
  <View style={styles.container}>
    <Notification />
  </View>
);

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
  },
});

export default NotificationScreen;

Custom Usage


import React from 'react';
import { View, StyleSheet } from 'react-native';
import { Notification } from 'react-native-skia-catalog';

const NotificationScreen = () => (
  <View style={styles.container}>
    <Notification notificationCount={15} color={'#F84F31'} size={220} />
  </View>
);

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
  },
});

export default NotificationScreen;

๐ŸŽฌ Custom Usage Preview


alt tag

Properties

PropsDefaultTypeDescription
size150numberSize of Image.
color#23C552stringColor of the notification counter-ball and the animated lines.
notificationCount1numberNumber of notification. If notification number in double digit, the notification number no would be displayed as 9+.

๐ŸŽฌ Preview Example


Notification