Sign in to Reactiive

Use your Google or Apple account.
Signing in subscribes you to the newsletter: new content and the occasional promotion. Unsubscribe at any time.
Skip to content

Story List UI App in React Native ๐Ÿ“š

Wednesday, March 15, 2023
enzomanuelmangano
demos
story-list
An ongoing collection of React Native animations crafted with Reanimated, Gesture Handler, and Skia.
TypeScript
3.2k
296
A horizontal scrollable story list with customizable item dimensions and animations.

What's This About?

This component creates an interactive story list with smooth scrolling and image display. It features customizable item dimensions, gap spacing, and the number of visible items. The implementation includes image caching, gesture handling, and responsive layout calculations, making it perfect for story viewers, image galleries, or horizontal carousels.

Technical Implementation

The component uses:
Gesture handling
Image caching
Responsive layout
Custom scrolling
Item visibility

Usage

// Basic usage <StoryList /> // Customized story list <StoryList stories={stories} pagingEnabled={false} storyItemDimensions={{ width: windowWidth * 0.7, height: windowWidth }} visibleItems={3} gap={35} renderItem={({ image }) => ( <Image contentFit="cover" cachePolicy="memory-disk" style={[ { borderRadius: 20 }, storyItemDimensions ]} source={image} /> )} /> // Story data structure const stories = [ { image: require('./assets/image_01.png') }, { image: require('./assets/image_02.jpg') } ]; // Dimensions calculation const { width } = useWindowDimensions(); const storyItemDimensions = useMemo(() => ({ width: width * 0.7, height: width }), [width]);

Unlock the beauty of React Native animations

Learn Reanimated, Gesture Handler & Skia with Reanimate.dev

Feedback on Story List

Ideas, bugs, or anything that felt off: I read every message. For anything else, write to hello@reactiive.io.
Send feedback