React Native Collapsible screenshot

React Native Collapsible

Author Avatar Theme by Oblador
Updated: 27 Aug 2024
2579 Stars

Animated collapsible component for React Native, good for accordions, toggles etc

Categories

Overview

The react-native-collapsible package provides an animated collapsible component for React Native, making use of the Animated API. This component is written in pure JavaScript, making it highly versatile and compatible with dynamic content heights. It also allows for components aware of their collapsed state, which is useful for elements like toggling arrows.

Features

  • Pure JavaScript: Compatible with React Native and easily integratable into projects.
  • Animated API: Utilizes the Animated API for smooth transitions and collapsible effects.
  • Dynamic Content Heights: Supports components with varying content heights.
  • Collapsed State Awareness: Components can be toggled to be aware of their collapsed state.
  • Alignment Control: Content alignment options including top, center, or bottom.
  • Customizable Transition Durations: Set the transition duration in milliseconds for personalized animations.
  • Easing Functions: Supports various easing functions for smooth transitions.

Installation

To install the react-native-collapsible package, you can use npm or yarn:

npm install react-native-collapsible

OR

yarn add react-native-collapsible

Summary

The react-native-collapsible library offers a versatile and animated solution for creating collapsible components in React Native projects. With support for custom animations, dynamic content heights, and awareness of collapsed states, it provides a convenient way to enhance user interactions and interface elements within mobile applications.