Skip to content

a prototype of upcoming catch up feature on slack, built with reanimated v3 & react-native-gesture-handler with typescript & react-native. 60fps smooth animations running on UI Thread.

License

Notifications You must be signed in to change notification settings

gupta-ji6/react-native-slack-catch-up

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

16 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

react-native-slack-catch-up

supports iOS supports Android supports web

Slack's upcoming "Catch Up" tinder-like mobile app feature shared here, built in react-native & typescript with smooth ✨ 60fps ✨ native reanimated & gesture-handler animations.

πŸ“± Demo

full-demo.mp4

Features

  • πŸ‘† Swipe right to mark as read, or left to keep unread.
  • βœ” Show different overlays on basis of swipe direction with animated opactiy depending on translation.
  • 🫰 Snap back card if swipe velocity is less than the configurable threshold.
  • ↔ Action buttons for swipe left & swipe right functionalities for accessibility & quick action.
  • ↩️ Undo anytime, we all make mistakes.
  • πŸ”’ Show number of threads left to catch up.
  • πŸ‘€ Show a peek of next card, if existing.
  • πŸ™Œ The OG emoji & title of Slack at stack end.
  • πŸ” Reset whole stack to start again.
  • ✨ 60fps native animtions running on UI thread.
  • πŸ’ͺ TypeScript support.
  • βš›οΈ Reusbale React functional components with configurable props.
  • β™» Supports Android, iOS & Web platforms.

✨ Micro Interactions & Animations

1. ⬆ Stack Enter Animation

The card stack smoothly slides in down on render. The action buttons below & header animates in same manner to compilment the motion.

Stack Entry Animation

2. πŸ‘† Top Card Touch Up & Touch Down Interaction

The top most card smoothly scales up & down on touch to make the user feel it's interactive.

Top Card Touch Up & Touch Down Interaction

3. πŸ‘€ Next Card Peek

It's a design principle to always show a part of next item in a list, to give a hint to user that there's more to explore.

Next Card Peek

4. 🫰 Snap Back To Center On Low Swipe Velocity

The card smoothly snaps back to it's position if the swipe velocity is less than a certain configurable threshold.

Snap Back To Center On Low Swipe Velocity

5. πŸ‘‰πŸ‘ˆ Animated Swipe Overlays

When user swipes in either direction, an overlay of the action is shown with animated opacity. the next card also scales up simultaneously as swipes away top card.

Animated Swipe Overlays

6. πŸ§ƒ Juicy Buttons

Buttons you wanna keep smashing because it feels like they're asking for it.

Juicy Buttons

7. πŸ” Zoom-In Entrance Of Stack End

When the stack ends, the end view enters with a smooth zoom-in animation & an action button slides in from the bottom.

Zoom-In Entrance Of Stack End

Components & API Reference

<ThreadStack />

Usage

    <ThreadStack
        data={threads}
        onSwipeLeft={(item) => {
            console.warn('left, ', item);
        }}
        onSwipeRight={(item) => {
            console.warn('right', item);
        }}
        allowSwipe
        showActionButtons
        stackEnd={{
            emoji: 'πŸ™Œ',
            heading: 'All Caught Up.',
            showReset: true,
        }}
        header={{
            visible: true,
            showNumberOfThreadsLeft: true,
            showUndoButton: true,
            showResetIconButton: true,
        }}
    />

Properties

Name Description Default Required
data The array of data to be rendered in the stack [] Required
onSwipeLeft Callback on swipe left action Optional
onSwipeRight Callback on swipe right action Optional
allowSwipe Whether to allow swipe gestures or not true Optional
showActionButtons Whether to show the action buttons at the bottom true Optional
header Configuration of header component { visible : true , showNumberOfThreadsLeft : true , showUndoButton : true , showResetIconButton : true , } Optional
stackEnd Configuration for the stack end view { emoji : ' πŸ™Œ ' , heading : ' All Caught Up. ' , showReset : true , }

πŸ› οΈ Built With

Note

The initial template was created with npx create-react-native-app my-app -t with-reanimated

  1. react-native - v72
  2. react-native-reanimated - v3
  3. react-native-gesture-handler - v2
  4. expo - v49

πŸ‘¨πŸ»β€πŸ’» Developement

  • Run yarn or npm install
  • Run yarn start or npm run start to try it out.

πŸ“ References

About

a prototype of upcoming catch up feature on slack, built with reanimated v3 & react-native-gesture-handler with typescript & react-native. 60fps smooth animations running on UI Thread.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published