rn-workaja-image-slider-box
v1.1.12
Published
React Native Image Slider Box customized with title and post date (powered by moment)
Downloads
12
Maintainers
Readme
rn-workaja-image-slider-box
This library use react-native-snap-carousel
and make easier way to create image slider box with full customization ability.
Notice:
See original Library https://github.com/archriss/react-native-snap-carousel
We don't edit or modify original library, we just use it with some additional style.
Custom Edition for Workaja Project
You can use data like this:
const NEWSLIDES = [
{
ID: 'e476145e-8eb2-42d7-8629-16192ac1ee26',
title: 'Story of Nature',
postDate: 1571579696,
cover: 'https://source.unsplash.com/1024x768/?nature',
},
{
ID: '3f1425ae-0c48-4211-b238-5d263f747562',
title: 'Water Land',
postDate: 1571579696,
cover: 'https://source.unsplash.com/1024x768/?water',
},
{
ID: 'cbef5cd1-722c-493f-beb5-730bcf92c2a0',
title: 'Famous Girl',
postDate: 1571579696,
cover: 'https://source.unsplash.com/1024x768/?girl',
},
{
ID: '41cb76d4-33a4-4cc9-996b-19fa4181c4b2',
title: 'Tree of Life',
postDate: 1571579696,
cover: 'https://source.unsplash.com/1024x768/?tree',
},
{
ID: '41cb76d4-33a4-4cc9-996b-19fa4181c4b3',
title: 'Cool Man',
postDate: 1571579696,
cover: 'https://source.unsplash.com/1024x768/?man',
},
];
Instead this...
const Images = [
'https://source.unsplash.com/1024x768/?nature',
'https://source.unsplash.com/1024x768/?water',
'https://source.unsplash.com/1024x768/?girl',
'https://source.unsplash.com/1024x768/?tree'
];
This one better for your news like project (which having title and postDate below the image);
FYI:
- Don't use stack or tinder like animation, since the text will stacking and make it look bad
- Don't forget to add stars if you like it