Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
react-native-reanimated-animated-accordion
Advanced tools
A simple animated expandable section for react native apps using reanimated
npm install react-native-reanimated-animated-accordion
or using yarn
yarn add react-native-reanimated-animated-accordion
⚠️ Make sure you have react-native-reanimated installed in your project.
import Expandable from 'react-native-reanimated-animated-accordion';
<View
style={{
width: '80%',
borderRadius: 20,
backgroundColor: 'white',
shadowOffset: {
height: -2,
width: 0,
},
elevation: 2,
shadowRadius: 20,
shadowOpacity: 0.07,
}}
>
<TouchableOpacity
style={{
padding: 20,
}}
onPress={() => {
setExpanded(!expanded);
}}
>
<Text>Toggle</Text>
</TouchableOpacity>
<View style={{ width: '100%' }}>
<Expandable
duration={speed}
expanded={expanded}
>
<View style={{ width: '100%', padding: 20, paddingTop: 0 }}>
<Text>
Lorem ipsum dolor sit amet consectetur, adipisicing elit.
Necessitatibus ab placeat alias commodi voluptatibus possimus
ducimus sit repellat praesentium fugit similique aut quam nemo
libero, aperiam deleniti modi natus quia!
</Text>
<Text>
Lorem ipsum dolor sit amet consectetur, adipisicing elit.
Necessitatibus ab placeat alias commodi voluptatibus possimus
ducimus sit repellat praesentium fugit similique aut quam nemo
libero, aperiam deleniti modi natus quia!
</Text>
<View
style={{ marginTop: 20, width: '100%', alignItems: 'center' }}
>
<Image
source={testImage}
style={{ height: 100, width: 100, resizeMode: 'contain' }}
/>
</View>
</View>
</Expandable>
</View>
</View>
If you would like to prevent collapsed components from being rendered, just add a renderWhenCollapsed={false}
.
this can help if you have heavy collapsed compoennts as it may reduce your boot time + ram.
<Expandable
duration={speed}
renderWhenCollapsed={false}
expanded={expanded}
>
//
</Expandable>
MIT
Made with create-react-native-library
FAQs
test
We found that react-native-reanimated-animated-accordion demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.