DEV Community

Voyz Shen
Voyz Shen

Posted on

2 2

A wonderful animated component for React-Native

Github仓库: https://github.com/Voyzz/react-native-swiper-hooks

NPM仓库: https://www.npmjs.com/package/react-native-swiper-hooks

Hello, folks!

🦄 This is a wonderful animated carsouel hooks component for React-Native

✨ 为React Native开发的轮播展示动画组件

👨🏻‍💻 Powered by Voyz Shen

🏫 Shanghai Jiao Tong University, Ctrip

Catalog


Demo


How to use

  • install
npm i react-native-animated-carousel --save
Enter fullscreen mode Exit fullscreen mode
  • import
import AnimatedCarousel from 'react-native-animated-carousel'
Enter fullscreen mode Exit fullscreen mode
  • Demo
const testData = [
  {
    title:'医疗',
    subTitle:'副标题1',
    bgImage:'https://i.loli.net/2020/09/17/qxoJu8G3fe97lrc.png',
    jumpUrl:''
  },
  ...
  {
    title:'生活',
    subTitle:'副标题12',
    bgImage:'https://i.loli.net/2020/09/17/rgiPpKRafObAQvN.png',
    jumpUrl:''
  }
]

...

<AnimatedCarousel cardList={testData} ></AnimatedCarousel>

Enter fullscreen mode Exit fullscreen mode

Properties

Prop Default Options Type Description
cardList / / Array data of cards
卡片数据

item properties ↓

Prop Default Options Type Description
title / / String title of card
subTitle / / String subtitle of card
bgImage / / String background image of card
jumpUrl / / String jump URL of card

Versions

  • v1.0.1 添加配置参数

  • v1.0.0 发布组件

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (0)

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

Rather than just generating snippets, our agents understand your entire project context, can make decisions, use tools, and carry out tasks autonomously.

Read full post

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay