Coder Social home page Coder Social logo

gupta-ji6 / react-native-slack-catch-up Goto Github PK

View Code? Open in Web Editor NEW
18.0 1.0 0.0 75.99 MB

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: Apache License 2.0

TypeScript 99.30% JavaScript 0.70%
animations expo react-native react-native-gesture-handler react-native-reanim reanim reanimated3 tinder-swiper micro-inter

react-native-slack-catch-up's Introduction

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

react-native-slack-catch-up's People

Contributors

gupta-ji6 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.