npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@tuya-oh/react-native-card-flip

v1.0.7-rc-0.0.3

Published

Card flip animation for React Native

Downloads

9

Readme

模板版本:v0.2.2

[!TIP] Github 地址

安装与使用

请到三方库的 Releases 发布地址查看配套的版本信息:@tuya-oh/react-native-card-flip Releases,并下载适用版本的 tgz 包。

进入到工程目录并输入以下命令:

[!TIP] # 处替换为 tgz 包的路径

npm

npm install @tuya-oh/react-native-card-flip@file:#

yarn

yarn add @tuya-oh/react-native-card-flip@file:#

下面的代码展示了这个库的基本使用场景:

[!WARNING] 使用时 import 的库名不变。

import React from 'react';
import {
  TouchableOpacity,
  StyleSheet,
  View,
  Text,
} from 'react-native';

import CardFlip from 'react-native-card-flip';

const App: () => React$Node = () => {
  return (
    <View style={styles.container}>
      <CardFlip style={styles.cardContainer} ref={card => (this.card = card)}>
        <TouchableOpacity
          activeOpacity={1}
          style={[styles.card, styles.card1]}
          onPress={() => this.card.flip()}>
          <Text style={styles.label}>AB</Text>
        </TouchableOpacity>
        <TouchableOpacity
          activeOpacity={1}
          style={[styles.card, styles.card2]}
          onPress={() => this.card.flip()}>
          <Text style={styles.label}>CD</Text>
        </TouchableOpacity>
      </CardFlip>
    </View>
  );
};

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#F5FCFF',
  },
  cardContainer: {
    width: 320,
    height: 470,
  },
  card: {
    width: 320,
    height: 470,
    backgroundColor: '#FE474C',
    borderRadius: 5,
    shadowColor: 'rgba(0,0,0,0.5)',
    shadowOffset: {
      width: 0,
      height: 1,
    },
    shadowOpacity: 0.5,
  },
  card1: {
    backgroundColor: '#FE474C',
  },
  card2: {
    backgroundColor: '#FEB12C',
  },
  label: {
    lineHeight: 470,
    textAlign: 'center',
    fontSize: 55,
    fontFamily: 'System',
    color: '#ffffff',
    backgroundColor: 'transparent',
  },
});

export default App;

约束与限制

兼容性

要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。

请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:@tuya-oh/react-native-card-flip Releases

属性

[!TIP] "Platform"列表示该属性在原三方库上支持的平台。

[!TIP] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。

CardFlip props

| Name | Description | Type | Required | Platform | HarmonyOS Support | | ------------- | -------------------------------------------------------------------------------------- | -------- | -------- | ----------- | ----------------- | | style | container style | object | no | iOS/Android | yes | | duration | flip duration | number | no | iOS/Android | yes | | flipZoom | zoom level on flip | number | no | iOS/Android | yes | | flipDirection | the rotation axis. 'x' or 'y | string | no | iOS/Android | yes | | perspective | 3D stereoscopic effect | number | no | iOS/Android | yes | | onFlip | function to be called when a card is fliped. it receives the card-sides index | function | no | iOS/Android | yes | | onFlipStart | function to be called when the flip-animation starts. it receives the card-sides index | function | no | iOS/Android | yes | | onFlipEnd | function to be called when the flip-animation ends. it receives the card-sides index | function | no | iOS/Android | yes |

CardStack actions

| Name | Description | Type | Required | Platform | HarmonyOS Support | | ------ | ---------------- | -------- | -------- | ----------- | ----------------- | | flip | Flips the card | function | no | iOS/Android | yes | | tip | Flips the card | function | no | iOS/Android | yes | | jiggle | Jiggles the card | function | no | iOS/Android | yes |

tip

| Name | Description | Type | Required | Platform | HarmonyOS Support | | --------- | ------------- | ------ | -------- | ----------- | ----------------- | | direction | tip direction | string | no | iOS/Android | yes | | progress | tip frequency | number | no | iOS/Android | yes | | duration | tip duration | number | no | iOS/Android | yes |

jiggle

| Name | Description | Type | Required | Platform | HarmonyOS Support | | -------- | ---------------- | ------ | -------- | ----------- | ----------------- | | count | Jiggle count | number | no | iOS/Android | yes | | duration | Jiggle duration | number | no | iOS/Android | yes | | progress | Jiggle frequency | number | no | iOS/Android | yes |

其他

开源协议

本项目基于 The MIT License (MIT) ,请自由地享受和参与开源。