Skip to content

Releases: react-native-motion-kit/react-native-swipe-deck

@react-native-motion-kit/swipe-deck@1.3.1

Choose a tag to compare

@github-actions github-actions released this 27 Jun 06:25
b2a2419

Patch Changes

  • #15 3521a83 Thanks @saseungmin! - Add the Rspress documentation site and refresh the npm package metadata.

  • #18 4a326d6 Thanks @saseungmin! - Migrate repository tooling from Yarn to pnpm while keeping the npm package published from the repository root.

@react-native-motion-kit/swipe-deck@1.3.0

Choose a tag to compare

@github-actions github-actions released this 20 Jun 07:30
319e77a

Minor Changes

  • #13 335c5cf Thanks @saseungmin! - Add source to committed swipe events so apps can distinguish gesture commits from programmatic action commits.

    ProfileDeck.useDeckEventListener("swipe", (event) => {
      if (event.source === "gesture") {
        console.log("User swiped", event.direction);
        return;
      }
    
      console.log("Programmatic action swiped", event.direction);
    });

    event.source is 'gesture' when a pan release commits the swipe and 'programmatic' when
    actions.swipeLeft() or actions.swipeRight() commits it. programmatic does not mean button; map
    it to a button only when that matches your app's UI.

    This is a TypeScript-visible event payload shape change: source is a required field on
    SwipeEvent<T>, so object literals, fixtures, or useDeckEvent('swipe', initialValue) values must
    include it.

@react-native-motion-kit/swipe-deck@1.2.0

Choose a tag to compare

@github-actions github-actions released this 17 Jun 14:42
f94178b

Minor Changes

  • #10 0a9615b Thanks @saseungmin! - Add Root-level allowedDirections to restrict accepted dismiss directions. Disallowed gesture releases keep the normal snap-back behavior, while programmatic swipe actions return false before starting dismiss motion.

    <ProfileDeck.Root
      data={profiles}
      getKey={(item) => item.id}
      allowedDirections={["right"]}
    >
      <ProfileDeck.Card>
        {({ item }) => <ProfileCard profile={item} />}
      </ProfileDeck.Card>
    </ProfileDeck.Root>

    Use allowedDirections={["left"]} for a pass-only deck, omit it for both directions, or pass [] to keep drag feedback while rejecting all dismisses.

  • #12 96f1fc5 Thanks @saseungmin! - Allow visibleCardCount={1} to render only the active card.

    This is the lightest rendering budget for decks that do not need a visible next-card stack or
    next-card promotion animation. The default remains 3, and visibleCardCount={2} still renders the
    active card plus the immediate next card.

    <ProfileDeck.Root
      data={profiles}
      getKey={(item) => item.id}
      visibleCardCount={1}
    >
      <ProfileDeck.Card>
        {({ item }) => <ProfileCard profile={item} />}
      </ProfileDeck.Card>
    </ProfileDeck.Root>

@react-native-motion-kit/swipe-deck@1.1.0

Choose a tag to compare

@github-actions github-actions released this 16 Jun 03:37
9cc39db

Minor Changes

  • #9 da9b96e Thanks @saseungmin! - Add interaction.dismissDirection to useDeckInteraction() so UI-thread consumers can read the accepted dismiss side without waiting for JS swipe events or inferring from raw drag direction.

    function DeckDismissFeedback() {
      const { dismissDirection, phase } = ProfileDeck.useDeckInteraction();
    
      const rightStyle = useAnimatedStyle(() => ({
        opacity:
          phase.get() === "dismissing" && dismissDirection.get() === "right"
            ? 1
            : 0,
      }));
    
      return <Animated.View style={rightStyle} />;
    }
  • #7 c3d8949 Thanks @saseungmin! - Add interaction.phase to useDeckInteraction() so UI-thread consumers can distinguish idle, dragging, dismissing, and undoing deck lifecycles without inferring from progress or JS events.

    function DeckPhaseFeedback() {
      const { phase } = ProfileDeck.useDeckInteraction();
    
      const dismissingStyle = useAnimatedStyle(() => ({
        opacity: phase.get() === "dismissing" ? 1 : 0.32,
      }));
    
      return <Animated.View style={dismissingStyle} />;
    }

@react-native-motion-kit/swipe-deck@1.0.2

Choose a tag to compare

@github-actions github-actions released this 11 Jun 12:57
dbd03b7

Patch Changes

  • #5 d30d558 Thanks @saseungmin! - Lower the minimum visibleCardCount to 2 while keeping the default at 3, allowing compact decks to render only the active card and the immediate next card.

    <SwipeDeck.Root
      data={profiles}
      getKey={(item) => item.id}
      visibleCardCount={2}
    >
      <SwipeDeck.Card>
        {({ item }) => <ProfileCard profile={item} />}
      </SwipeDeck.Card>
    </SwipeDeck.Root>

@react-native-motion-kit/swipe-deck@1.0.1

Choose a tag to compare

@github-actions github-actions released this 11 Jun 09:35
f127a67

Patch Changes

  • #3 a6b2b6b Thanks @saseungmin! - Update the English and Korean READMEs with the React Native Motion Kit logo and remove internal API direction notes from the public docs.

@react-native-motion-kit/swipe-deck@1.0.0

Choose a tag to compare

@github-actions github-actions released this 11 Jun 08:46
53b3966

Major Changes

  • 32f1f9a Thanks @saseungmin! - Initial stable release of @react-native-motion-kit/swipe-deck.

    • Add factory-scoped createSwipeDeck<T>() components and hooks.
    • Render a bounded swipe deck powered by Reanimated and Gesture Handler.
    • Support programmatic swipe actions, undo, deck state, and event hooks.
    • Add customizable Tinder-style, action, and undo motion configuration.
    • Include example app, documentation, CI, and release setup.