npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@freefugga/smooth-swipe-core

v0.1.2

Published

Shared types and motion math for smooth swipe buttons.

Readme

@freefugga/smooth-swipe-core

Shared core utilities for the Smooth Swipe Button packages by Nishidh Jain (@freefugga).

This package contains the shared:

  • types
  • default config
  • threshold logic
  • progress math
  • render-state helpers

It is mainly intended for package internals, advanced integrations, or anyone building wrappers on top of the React and React Native packages.

Current shared behavior defaults:

  • success threshold: 0.8
  • spring reset: enabled by default in UI packages
  • spring duration: 0.5 seconds, capped at 0.5

Install

npm install @freefugga/smooth-swipe-core

When To Use This Package

Use this package if you are:

  • building your own swipe button wrapper
  • sharing swipe logic across multiple UI adapters
  • consuming the shared types in design-system code

If you just want a ready-to-use component, install one of these instead:

  • React web: @freefugga/react-smooth-swipe-button
  • React Native: @freefugga/react-native-smooth-swipe-button

Usage

import {
  DEFAULT_SWIPE_CONFIG,
  clamp,
  getMaxThumbX,
  getProgress,
  shouldComplete,
} from "@freefugga/smooth-swipe-core";

const maxX = getMaxThumbX(320, DEFAULT_SWIPE_CONFIG.thumbSize, DEFAULT_SWIPE_CONFIG.thumbMargin);
const progress = getProgress(180, maxX);
const isComplete = shouldComplete(progress, DEFAULT_SWIPE_CONFIG.threshold);

console.log({ maxX, progress, isComplete, clamped: clamp(progress, 0, 1) });

Main Exports

import {
  DEFAULT_SWIPE_CONFIG,
  DEFAULT_ANIMATION_CONFIG,
  clamp,
  createRenderState,
  getMaxThumbX,
  getProgress,
  resolveAnimationConfig,
  resolveIsRTL,
  shouldComplete,
} from "@freefugga/smooth-swipe-core";

Included Types

type SwipeDirection = "auto" | "ltr" | "rtl";
type SwipeResult = "success" | "cancel";
type CompleteBehavior = "reset" | "stay-complete";

Notes

  • This package does not render a UI component by itself.
  • It is a shared foundation used by the React and React Native packages.
  • For most app developers, the UI packages are the correct installation target.

License

MIT, copyright Nishidh Jain.