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 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-native-expanding-collection-view

v1.0.0

Published

React Native component for creating animated, expanding collection

Downloads

3

Readme

About

Our company provides custom UI design and development solutions for mobile applications and websites.

Need a team to create a project?

This project is developed and maintained by openGeeksLab LLC.

react-native-expanding-collection-view

Requirements

  • React Native 0.50+
  • iOS 9.0+
  • Android 4.2+

Installation

Just run:

  • npm i react-native-expanding-collection-view

Basic usage

For the work with the library you have to use the next parameters:
data - is the array of objects that contains the information required to display on the card.

renderFrontCard - is the function that renders the front card. It should return the component that is used as a card and can get the parameters of itemData and animation. itemData - is the data for this card. animation - is the animation for the card.


import AnimatedBackground from './backgroundImage';
  ...
renderFrontCard = (itemData, animation) => (
  <AnimatedBackground
    source={ itemData.img }
    imageStyle={styles.backgroundImage}
    style={{
     height: animation.interpolate({
       inputRange: treshholds,
       outputRange: [0, 1, 1],
     }),
     borderRadius: animation.interpolate({
       inputRange: treshholds,
       outputRange: [0, values.borderRadius, values.borderRadius],
     }),
    }}
  />
)

renderBackCard - is the function that renders the back card. It should return the component that is used as a card or as the opened screen and can get the parameters of itemData and animation.

renderDescription - is the function that renders the description at the bottom of the front card and can get the parameters of itemData and animation. It should return a component that is used as a description and can get the parameters of data and animation.

inactiveSlideOpacity - is the transparency of the inactive card (from 0 to 1)
frontCardColor - is the color of the background of the front card.
backCardColor - is the color of the background of the back card.

  import ExpandingCollection from 'react-native-expanding-collection-view';

  ...

  <ExpandingCollection
    data={cities}
    cardBorder={30}
    frontCardColor={'transparent'}
    renderFrontCard={this.renderFrontCard}
    renderBackCard={this.renderBackCard}
    renderDescription={this.renderDescription}
  />

Contact us if interested.

Licence

Expanding is released under the MIT license.