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

react-native-yet-another-sortable

v2.0.1

Published

Drag-and-drop sortable scrollable grid view for React Native.

Readme

react-native-yet-another-sortable

Features

A sortable scrollable grid / list component for React Native, essentially based on react-native-sortable-grid. Does not require react-native-reanimated.

  • Change number of columns and row height on the fly
  • Performant item additions, deletions, order shuffles, container width/height changes
  • Controllable order
  • Allows for not-swappable and not-draggable grid elements
  • Auto-scroll when dragged item is close to container's borders

Installation

npm install react-native-yet-another-sortable --save

Usage

Check out example project.

Or check a minimal example to copy-paste:

Minimal SortableGrid example

import React, { useState } from 'react';
import { View, Text } from 'react-native';
import { SortableGrid } from 'react-native-yet-another-sortable';
const Component = () => {
  const [ items, setItems ] = useState(Array.from({ length: 5 }, (_, i) => ({ value: i, key: i })));
  const [ order, setOrder ] = useState(items.map(({ key }) => key));
  return (
    <SortableGrid
      items={items}
      order={order}
      renderItem={({ value }) => (<View><Text>{value}</Text></View>)}
      onDeactivateDrag={(order) => setOrder(order)}
    />
  );
};

API

Autogenerated documentation is here.

Q&A

How make certain items not draggable?

When passing items array set dragDisabled property to true for those items that you don't want to be draggable.

How to make certain items fixed?

Provide a fixed prop with a Set of keys.

How to use custom activation animation or add haptic feedback?

  1. Use animateActiveStyle property by providing function to animate activation progress animation like this:
  (animation) => requestAnimationFrame(() => {
    animation.setValue(1);
    Animated.spring(animation, { toValue: 0, velocity: 2000, tension: 2000, friction: 5, useNativeDriver: true }).start();
  })
  1. Use getActiveStyle property by providing function that maps the animation to active Cell style:
  (animation) => ({
    transform: [ { rotate: animation.interpolate({ inputRange: [0, 1], outputRange: ['0deg', '1deg'] }) } ],
    elevation: 10,
    zIndex: 1,
  })

Other side-effects could be performed in onActivateDrag callback.

Development

In order to develop the application or build android .apk from the sources one should:

  1. Clone this repository
  2. Navigate to parent directory and install dev dependencies with npm ci for linting npm run lint and typescript typechecking npm run typecheck.
  3. Navigate to example folder: cd example
  4. Install example project dependencies npm ci, since library has only peer dependencies
  5. Run Metro bundler with npm run start
  6. Connect physical device or an emulator via adb, like this (tested with mEMU):
    • adb connect 127.0.0.1:21503
    • adb reverse tcp:8081 tcp:8081
  7. Build and watch with npm run-android, changes from src directory are picked automatically because of example metro and babel configurations.

Note: example project is configured in a way, that may cause issues if you save anything as a regular dependency in parent library

Contributions

PR are always welcome!