A set of higher-order components to turn any list into an animated, accessible and touch-friendly sortable list✌️

Last update: Jun 19, 2022

React Sortable HOC

A set of higher-order components to turn any list into an animated, accessible and touch-friendly sortable list

npm version npm downloads license Gitter gzip size

Examples available here: http://clauderic.github.io/react-sortable-hoc/

⚠️ Important notice for new consumers

New consumers are strongly encouraged to check out @dnd-kit before adopting this library in a new project. It supports all of the features of react-sortable-hoc, but with a more modern and extensible architecture.

This library will continue to receive critical updates and bug fixes for the foreseeable future, but there are no new features planned. In future versions of React, the findDOMNode method will be deprecated. This method is a critical piece of the architecture of react-sortable-hoc, and it's unlikely that the library could continue to exist with its current architecture once this method is deprecated. In light of this, all development efforts have been redirected towards @dnd-kit.

Features

  • Higher Order Components – Integrates with your existing components
  • Drag handle, auto-scrolling, locked axis, events, and more!
  • Suuuper smooth animations – Chasing the 60FPS dream 🌈
  • Works with virtualization libraries: react-virtualized, react-tiny-virtual-list, react-infinite, etc.
  • Horizontal lists, vertical lists, or a grid
  • Touch support 👌
  • Accessible: supports keyboard sorting

Installation

Using npm:

$ npm install react-sortable-hoc --save

Then, using a module bundler that supports either CommonJS or ES2015 modules, such as webpack:

// Using an ES6 transpiler like Babel
import {SortableContainer, SortableElement} from 'react-sortable-hoc';

// Not using an ES6 transpiler
var Sortable = require('react-sortable-hoc');
var SortableContainer = Sortable.SortableContainer;
var SortableElement = Sortable.SortableElement;

Alternatively, an UMD build is also available:

">
<script src="react-sortable-hoc/dist/react-sortable-hoc.umd.js">script>

Usage

Basic Example

import React, {Component} from 'react';
import {render} from 'react-dom';
import {SortableContainer, SortableElement} from 'react-sortable-hoc';
import arrayMove from 'array-move';

const SortableItem = SortableElement(({value}) => <li>{value}</li>);

const SortableList = SortableContainer(({items}) => {
  return (
    <ul>
      {items.map((value, index) => (
        <SortableItem key={`item-${value}`} index={index} value={value} />
      ))}
    </ul>
  );
});

class SortableComponent extends Component {
  state = {
    items: ['Item 1', 'Item 2', 'Item 3', 'Item 4', 'Item 5', 'Item 6'],
  };
  onSortEnd = ({oldIndex, newIndex}) => {
    this.setState(({items}) => ({
      items: arrayMove(items, oldIndex, newIndex),
    }));
  };
  render() {
    return <SortableList items={this.state.items} onSortEnd={this.onSortEnd} />;
  }
}

render(<SortableComponent />, document.getElementById('root'));

That's it! React Sortable does not come with any styles by default, since it's meant to enhance your existing components.

More code examples are available here.

Why should I use this?

There are already a number of great Drag & Drop libraries out there (for instance, react-dnd is fantastic). If those libraries fit your needs, you should definitely give them a try first. However, most of those libraries rely on the HTML5 Drag & Drop API, which has some severe limitations. For instance, things rapidly become tricky if you need to support touch devices, if you need to lock dragging to an axis, or want to animate the nodes as they're being sorted. React Sortable HOC aims to provide a simple set of higher-order components to fill those gaps. If you're looking for a dead-simple, mobile-friendly way to add sortable functionality to your lists, then you're in the right place.

Prop Types

SortableContainer HOC

Property Type Default Description
axis String y Items can be sorted horizontally, vertically or in a grid. Possible values: x, y or xy
lockAxis String If you'd like, you can lock movement to an axis while sorting. This is not something that is possible with HTML5 Drag & Drop. Possible values: x or y.
helperClass String You can provide a class you'd like to add to the sortable helper to add some styles to it
transitionDuration Number 300 The duration of the transition when elements shift positions. Set this to 0 if you'd like to disable transitions
keyboardSortingTransitionDuration Number transitionDuration The duration of the transition when the helper is shifted during keyboard sorting. Set this to 0 if you'd like to disable transitions for the keyboard sorting helper. Defaults to the value set for transitionDuration if undefined
keyCodes Array {
  lift: [32],
  drop: [32],
  cancel: [27],
  up: [38, 37],
  down: [40, 39]
}
An object containing an array of keycodes for each keyboard-accessible action.
pressDelay Number 0 If you'd like elements to only become sortable after being pressed for a certain time, change this property. A good sensible default value for mobile is 200. Cannot be used in conjunction with the distance prop.
pressThreshold Number 5 Number of pixels of movement to tolerate before ignoring a press event.
distance Number 0 If you'd like elements to only become sortable after being dragged a certain number of pixels. Cannot be used in conjunction with the pressDelay prop.
shouldCancelStart Function Function This function is invoked before sorting begins, and can be used to programatically cancel sorting before it begins. By default, it will cancel sorting if the event target is either an input, textarea, select, option, or button.
updateBeforeSortStart Function This function is invoked before sorting begins. It can return a promise, allowing you to run asynchronous updates (such as setState) before sorting begins. function({node, index, collection, isKeySorting}, event)
onSortStart Function Callback that is invoked when sorting begins. function({node, index, collection, isKeySorting}, event)
onSortMove Function Callback that is invoked during sorting as the cursor moves. function(event)
onSortOver Function Callback that is invoked when moving over an item. function({index, oldIndex, newIndex, collection, isKeySorting}, e)
onSortEnd Function Callback that is invoked when sorting ends. function({oldIndex, newIndex, collection, isKeySorting}, e)
useDragHandle Boolean false If you're using the SortableHandle HOC, set this to true
useWindowAsScrollContainer Boolean false If you want, you can set the window as the scrolling container
hideSortableGhost Boolean true Whether to auto-hide the ghost element. By default, as a convenience, React Sortable List will automatically hide the element that is currently being sorted. Set this to false if you would like to apply your own styling.
lockToContainerEdges Boolean false You can lock movement of the sortable element to it's parent SortableContainer
lockOffset OffsetValue* | [OffsetValue*, OffsetValue*] "50%" WhenlockToContainerEdgesis set totrue, this controls the offset distance between the sortable helper and the top/bottom edges of it's parentSortableContainer. Percentage values are relative to the height of the item currently being sorted. If you wish to specify different behaviours for locking to the top of the container vs the bottom, you may also pass in anarray(For example:["0%", "100%"]).
getContainer Function Optional function to return the scrollable container element. This property defaults to the SortableContainer element itself or (if useWindowAsScrollContainer is true) the window. Use this function to specify a custom container object (eg this is useful for integrating with certain 3rd party components such as FlexTable). This function is passed a single parameter (the wrappedInstance React element) and it is expected to return a DOM element.
getHelperDimensions Function Function Optional function({node, index, collection}) that should return the computed dimensions of the SortableHelper. See default implementation for more details
helperContainer HTMLElement | Function document.body By default, the cloned sortable helper is appended to the document body. Use this prop to specify a different container for the sortable clone to be appended to. Accepts an HTMLElement or a function returning an HTMLElement that will be invoked before right before sorting begins
disableAutoscroll Boolean false Disables autoscrolling while dragging

* OffsetValue can either be a finite Number or a String made up of a number and a unit (px or %). Examples: 10 (which is the same as "10px"), "50%"

SortableElement HOC

Property Type Default Required? Description
index Number This is the element's sortableIndex within it's collection. This prop is required.
collection Number or String 0 The collection the element is part of. This is useful if you have multiple groups of sortable elements within the same SortableContainer. Example
disabled Boolean false Whether the element should be sortable or not

FAQ

Running Examples

In root folder, run the following commands to launch React Storybook:

$ npm install
$ npm start

Accessibility

React Sortable HOC supports keyboard sorting out of the box. To enable it, make sure your SortableElement or SortableHandle is focusable. This can be done by setting tabIndex={0} on the outermost HTML node rendered by the component you're enhancing with SortableElement or SortableHandle.

Once an item is focused/tabbed to, pressing SPACE picks it up, ArrowUp or ArrowLeft moves it one place backward in the list, ArrowDown or ArrowRight moves items one place forward in the list, pressing SPACE again drops the item in its new position. Pressing ESC before the item is dropped will cancel the sort operations.

Grid support

Need to sort items in a grid? We've got you covered! Just set the axis prop to xy. Grid support is currently limited to a setup where all the cells in the grid have the same width and height, though we're working hard to get variable width support in the near future.

Item disappearing when sorting / CSS issues

Upon sorting, react-sortable-hoc creates a clone of the element you are sorting (the sortable-helper) and appends it to the end of the tag. The original element will still be in-place to preserve its position in the DOM until the end of the drag (with inline-styling to make it invisible). If the sortable-helper gets messed up from a CSS standpoint, consider that maybe your selectors to the draggable item are dependent on a parent element which isn't present anymore (again, since the sortable-helper is at the end of the ). This can also be a z-index issue, for example, when using react-sortable-hoc within a Bootstrap modal, you'll need to increase the z-index of the SortableHelper so it is displayed on top of the modal (see #87 for more details).

Click events being swallowed

By default, react-sortable-hoc is triggered immediately on mousedown. If you'd like to prevent this behaviour, there are a number of strategies readily available. You can use the distance prop to set a minimum distance (in pixels) to be dragged before sorting is enabled. You can also use the pressDelay prop to add a delay before sorting is enabled. Alternatively, you can also use the SortableHandle HOC.

Wrapper props not passed down to wrapped Component

All props for SortableContainer and SortableElement listed above are intentionally consumed by the wrapper component and are not passed down to the wrapped component. To make them available pass down the desired prop again with a different name. E.g.:

const SortableItem = SortableElement(({value, sortIndex}) => (
  <li>
    {value} - #{sortIndex}
  </li>
));

const SortableList = SortableContainer(({items}) => {
  return (
    <ul>
      {items.map((value, index) => (
        <SortableItem
          key={`item-${index}`}
          index={index}
          sortIndex={index}
          value={value}
        />
      ))}
    </ul>
  );
});

Dependencies

React Sortable HOC only depends on invariant. It has the following peerDependencies: react, react-dom

Reporting Issues

If believe you've found an issue, please report it along with any relevant details to reproduce it. The easiest way to do so is to fork the react-sortable-hoc basic setup sandbox on CodeSandbox:

Edit on CodeSandbox

Asking for help

Please do not use the issue tracker for personal support requests. Instead, use Gitter or StackOverflow.

Contributions

Yes please! Feature requests / pull requests are welcome.

GitHub

https://github.com/clauderic/react-sortable-hoc/
Comments
  • 1. feat: Support for dragging items between Lists

    drag

    • Changed stories port to 8082 so it can be used online
    • Add stories for horizontal, vertical and grid lists
    • Add labels to storybook list items so they can be differentiated
    Reviewed by jdbence at 2017-02-05 08:45
  • 2. Sometimes doesn't work in Chrome

    When first loaded in a new Chrome window, dragging works fine, then for some reason it just stops working in every tab on that window. If I open a new window it works again. Both my code and the examples stop working with no indication to a problem in the console.

    Reviewed by nbrady-techempower at 2016-06-21 15:26
  • 3. Input field within a SortableElement loses focus on typing

    I have a sorted list of divs. Within these divs, there are a few input fields. The value of these fields are maintained in the state - so every key press triggers a re-render. Everything works as expected, except for the fact that the input loses focus after each key press. See below:

    example

    I feel like I'm close to understanding this - but just can't figure out how to make it work. I've read through the issues, and it feels similar to #49. I know you have the shouldCancelStart and distance parameters (with shouldCancelStart defaulting to true for inputs, textareas, etc). But, it doesn't seem that disabling the drag is the problem (and indeed, perhaps the fact that I have a dragHandle makes these irrelevant).

    I also thought that if I make sure everything in the SortableElement has a key, it would re-render and see that it was unchanged, but focus is still lost. Any ideas?

    Thanks so much for your work on this project.

    Reviewed by isTravis at 2017-01-17 19:25
  • 4. Selected Element getting disappeared

    Hi , Whenever i try drag an element the element disappears and after drag finish the element appears. Please help me. Component is excellent and perfect

    Thanks

    Reviewed by Miteshdv at 2016-11-14 11:50
  • 5. Uncaught TypeError: Cannot read property 'top' of undefined(…)

    Initally Dragging seems fine, i am re sorting my array and re setting the state on onSortEnd. After 1-2 drags, I am able to drag single element but all other elements in list is stuck.Other Elements does not scroll. onSortEnd: function (newProps) { var oldGroups = this.state.groups; oldGroups.move(newProps.oldIndex, newProps.newIndex); this.setState({groups: oldGroups}); },

    Reviewed by sahilchaddha at 2016-12-01 08:54
  • 6. Possible Fix for Bug #58

    Switched to using document.documentElement instead of document.body when using useWindowAsScrollContainer option. Tested to work in latest Chrome and Opera, not tested in Safari.

    Reviewed by jimyaghi at 2017-10-04 10:43
  • 7. Grid support

    Added drag & drop support in a grid, as requested in #4.

    • I added a new axis option: xy. I kept this a string to stay backwards compatible. You mentioned it should probably be an array/object, and while I found no immediate need for that, that should be a fairly straightforward change.

    • As you now have the option to (potentially) move over the x and y axis, I had to change most functions to explicitly work with x/y, width/height and top/left instead of using dimension and edge. This resulted in slightly more verbose code, especially in animateNodes(), but I decided to keep it like this initially, so the changes are clear. We can always apply extra changes to make things more compact, if needed. I did make an effort to keep loops and calculations as effecient as possible.

    Other changes:

    • Added Grid story
    • Added some missing proptypes in stories
    Reviewed by richmeij at 2016-11-12 00:09
  • 8. Feature Request: Drag and drop in a Grid

    Hi @clauderic! I thought I'll create a standing issue incase anyone else is interested in working on this or has thoughts as well.

    The feature request: Be able to drag and drop across axis, i.e., in a grid of any sort. Currently, the library only works one axis at a time.

    Based on conversations with @clauderic, I looked into the issue a little bit more and it seems like the changes are only limited to SortableContainer and that too, mostly around calculating offset and managing the translate3d function. I am still trying to familiarize myself with how they really work.

    I also imagine we'll need to also add a new prop or modify 'axis' prop to reflect the three choices - x, y or xy.

    Reviewed by oyeanuj at 2016-06-10 04:00
  • 9. Fix for using window as scrolling container

    Right now, even in the story book, this is broken on chrome, ff, & edge.

    This just fixes it to not use document.body to set the scroll. There was also an issue with double computation in the animateNodes function, where if the scrollcontainer was set to the parent, and we calculate both window and parent separately, it's a problem. So the key is to just use the scrollcontainer to SET the scroll value, and assume both window and container can scroll.

    Reviewed by aminland at 2017-11-06 21:41
  • 10. Change layout before dragging

    Is there any way to change the layout before dragging, e.g. hide stuff in the element that is being dragged? I tried using CSS but since the height is put on the style tag this doesn't have the desired effect..

    Reviewed by Robinfr at 2017-02-10 14:36
  • 11. index is undefined in SortableElement v 0.4.10

    Hello, I updated to version 0.4.10 and now when I try to access index prop inside my SortableElement it is undefined, in the meantime I will return to previous version where everything is fine.

    const SortableItem = SortableElement((props) => {
        const {name, fields, index} = props;
        
        if(fields.get(index).type == 'error'){
            return(
                <div className="file-upload-file-container file-container-error">
                    {fields.get(index).file.name}
                </div>
            )
    
        } else{
            return (
                <div className="file-upload-file-container">
                    {fields.get(index).file.name}
                </div>
            )
        }
    
    });
    
    
    const SortableList=SortableContainer(({fields, onDeleteItem})=>{
        return (
            <div className="">
                {fields.map((name, index, fields) => {
                    return(
                        <SortableItem
                            key={`item-${index}`}
                            name={name}
                            index={index}
                            fields={fields}
                            >
                        </SortableItem>
                    )
                })}
            </div>
        )
    })
    
    Reviewed by tecnoloco at 2017-01-25 23:13
  • 12. chore(deps): bump eventsource from 1.0.7 to 1.1.1

    Bumps eventsource from 1.0.7 to 1.1.1.

    Changelog

    Sourced from eventsource's changelog.

    1.1.1

    • Do not include authorization and cookie headers on redirect to different origin (#273 Espen Hovlandsdal)

    1.1.0

    • Improve performance for large messages across many chunks (#130 Trent Willis)
    • Add createConnection option for http or https requests (#120 Vasily Lavrov)
    • Support HTTP 302 redirects (#116 Ryan Bonte)
    • Prevent sequential errors from attempting multiple reconnections (#125 David Patty)
    • Add new to correct test (#111 Stéphane Alnet)
    • Fix reconnections attempts now happen more than once (#136 Icy Fish)
    Commits
    • aa7a408 1.1.1
    • 56d489e chore: rebuild polyfill
    • 4a951e5 docs: update history for 1.1.1
    • f9f6416 fix: strip sensitive headers on redirect to different origin
    • 9dd0687 1.1.0
    • 49497ba Update history for 1.1.0 (#146)
    • 3a38537 Update history for #136
    • 46fe04e Merge pull request #136 from icy-fish/master
    • 9a4190f Fix issue: reconnection only happends for 1 time after connection drops
    • 61e1b19 test: destroy both proxied request and response on close
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    Reviewed by dependabot[bot] at 2022-06-01 01:24
  • 13. chore(deps): bump simple-get from 2.8.1 to 2.8.2

    Bumps simple-get from 2.8.1 to 2.8.2.

    Commits
    Maintainer changes

    This version was pushed to npm by linusu, a new releaser for simple-get since your current version.


    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    Reviewed by dependabot[bot] at 2022-05-16 17:11
  • 14. Notice for new consumers does not show up on npm

    I see the README contains a disclaimer not to depend on this module: https://github.com/clauderic/react-sortable-hoc#%EF%B8%8F-important-notice-for-new-consumers. This section is not displayed on the npm page, where it is the most important!

    Screen Shot 2022-05-13 at 12 09 33 PM
    Reviewed by benjaminpjones at 2022-05-13 19:11
  • 15. As soon as i click on drag handle it moves away either in top direction or in bottom direction with some offset

    I am using container inside another container (not immediate to its parent but somewhere deep down in parent) sortablecontainer

    sortableItem ...... some childs

    ... so on **sortablecontainer** **sortableItem** **/sortableItem** **/sortablecontainer**

    /sortableItem .... so on

    /sortablecontainer

    As soon as i click on drag handle it moves in either top or bottom direction with some offset.

    Moreover its element is getting outside of container even after using lockAxis and locktocontaineredges.

    I am not able to find any solution for this

    Reviewed by nitish-arora at 2022-05-02 12:53
A sortable list component built with React

React Sortable Higher-order component for creating sortable lists with minimalistic implementation and without polyfills. Using just React.js and HTML

May 19, 2022
Simple, lightweight and highly customizable dnd nested sortable React component based on React DnD

React Sortly Simple, lightweight and highly customizable dnd nested sortable React component based on React DnD Supported to sort the tree, vertical l

Jun 18, 2022
Create and reorder lists with drag-and-drop. For use with modern browsers and touch devices

Sortable Sortable is a JavaScript library for reorderable drag-and-drop lists. Demo: http://sortablejs.github.io/Sortable/ Features Supports touch dev

Jun 23, 2022
Neat table/list views with filtering and pagination support; powered by React.

react-object-list Component used to display an array of object based data in a sortable, filterable, paginated, list based view, powered by React. Cus

May 24, 2021
React Virtuoso is the most powerful React virtual list component, full stop
React Virtuoso is the most powerful React virtual list component, full stop

The most powerful virtual list component for React

Jun 18, 2022
A React component for (list) items with swipe to reveal actions.
A React component for (list) items with swipe to reveal actions.

A React component for (list) items with swipe to reveal actions.

Mar 8, 2022
Super simple virtualized list React component

react-virtual-list Super simple virtualized list higher-order component for React version ^15.0.0 || ^16.0.0. Check out the demo here react-virtual-li

Jun 8, 2022
React component for rendering columns from a list of children with horizontal ordering
React component for rendering columns from a list of children with horizontal ordering

react-columns React component for rendering columns from a list of children with horizontal ordering Installation npm install --save react-columns Fea

Feb 9, 2022
A React utility belt for function components and higher-order components.

A Note from the Author (acdlite, Oct 25 2018): Hi! I created Recompose about three years ago. About a year after that, I joined the React team. Today,

Jun 15, 2022
A React Higher Order Component library to assign class names to components, looks like styled-components

Claas A React Higher Order Component library to assign classNames to components, looks like styled-components Why I always liked to use Tailwind and w

Mar 25, 2022
Lightweight auth library based on oidc-client for React single page applications (SPA). Support for hooks and higher-order components (HOC).

Lightweight auth library based on oidc-client for React single page applications (SPA). Support for hooks and higher-order components (HOC).

Jun 19, 2022
Redux bindings for Firebase. Includes React Hooks and Higher Order Components.

react-redux-firebase Redux bindings for Firebase. Includes Higher Order Component (HOC) for use with React. Usage Note If you are starting a new proje

Jun 18, 2022
Two decorators (higher order components) that inject "window" scroll position, dimensions, orientation and breakpoint to your component's props.

React Window Decorators Two decorators (higher order components) that inject window scroll position, dimensions, orientation, breakpoint* and isTouchD

Feb 10, 2022
:hourglass_flowing_sand: A higher order component for loading components with promises.
:hourglass_flowing_sand: A higher order component for loading components with promises.

A higher order component for loading components with dynamic imports. Install yarn add react-loadable Example import Loadable from 'react-loadable'; i

Jun 19, 2022
Prebuilt Chakra UI Higher Order Components
Prebuilt Chakra UI Higher Order Components

CHOC is acronym for Chakra Higher Order Components. Choc UI is a collection of components, inspired by many sources of well used web components, which are rebuilt based on the Chakra UI library.

Jun 24, 2022
React higher order component for adding onEnterKeyDown to input components

React higher order component for adding onEnterKeyDown to input components

May 4, 2020
React - NextJs + Tailwindcss+ PWA: JSON Visualizer to turn raw and chunky JSON into Visual good-looking data groups
React - NextJs + Tailwindcss+ PWA: JSON Visualizer to turn raw and chunky JSON into Visual good-looking data groups

React - NextJs + Tailwindcss+ PWA: JSON Visualizer to turn raw and chunky JSON into Visual good-looking data groups

May 13, 2022
Turn a path string such as `/user/:name` into a regular expression

Path-to-RegExp Turn a path string such as /user/:name into a regular expression. Installation npm install path-to-regexp --save Usage const { pathToR

Jun 25, 2022
A Higher Order Component using react-redux to keep form state in a Redux store
A Higher Order Component using react-redux to keep form state in a Redux store

redux-form You build great forms, but do you know HOW users use your forms? Find out with Form Nerd! Professional analytics from the creator of Redux

Jun 23, 2022
:recycle: higher order reducer to add undo/redo functionality to redux state containers
:recycle: higher order reducer to add undo/redo functionality to redux state containers

redux undo/redo simple undo/redo functionality for redux state containers Protip: Check out the todos-with-undo example or the redux-undo-boilerplate

Jun 22, 2022