react-beautiful-dnd vs react-sortable-hoc vs sortablejs
ドラッグ&ドロップライブラリ
react-beautiful-dndreact-sortable-hocsortablejs類似パッケージ:

ドラッグ&ドロップライブラリ

ドラッグ&ドロップライブラリは、ユーザーが要素を画面上で移動させることを可能にするツールです。これにより、インタラクティブなユーザーインターフェースを構築し、ユーザーエクスペリエンスを向上させることができます。これらのライブラリは、Reactアプリケーションにおいて、リストやグリッドのアイテムを簡単に並べ替えたり、移動させたりするための機能を提供します。

npmのダウンロードトレンド

3 年

GitHub Starsランキング

統計詳細

パッケージ
ダウンロード数
Stars
サイズ
Issues
公開日時
ライセンス
react-beautiful-dnd034,0321.39 MB643-Apache-2.0
react-sortable-hoc010,900-2915年前MIT
sortablejs031,044640 kB5151ヶ月前MIT

機能比較: react-beautiful-dnd vs react-sortable-hoc vs sortablejs

アクセシビリティ

  • react-beautiful-dnd:

    このライブラリは、アクセシビリティに配慮して設計されており、キーボード操作やスクリーンリーダーに対応しています。これにより、すべてのユーザーがドラッグ&ドロップ機能を利用できるようになります。

  • react-sortable-hoc:

    アクセシビリティのサポートはありますが、react-beautiful-dndほどの配慮はされていません。基本的なドラッグ&ドロップ機能を提供しますが、特別なアクセシビリティ機能は少ないです。

  • sortablejs:

    このライブラリは、アクセシビリティに関する機能が組み込まれていないため、独自に実装する必要があります。一般的なドラッグ&ドロップ機能を提供しますが、アクセシビリティの観点からは注意が必要です。

カスタマイズ性

  • react-beautiful-dnd:

    多くのカスタマイズオプションがあり、ドラッグ&ドロップの動作やスタイルを詳細に設定できます。特に、アニメーションやスタイルのカスタマイズが容易です。

  • react-sortable-hoc:

    カスタマイズが容易で、独自のドラッグ&ドロップの動作を簡単に実装できます。特に、リストの並べ替えに特化しているため、シンプルな要件に最適です。

  • sortablejs:

    非常に高いカスタマイズ性を持ち、さまざまなオプションを設定できます。特に、複雑なドラッグ&ドロップの要件に対応するための柔軟性があります。

パフォーマンス

  • react-beautiful-dnd:

    パフォーマンスは良好ですが、複雑なリストや大量のデータを扱う場合、パフォーマンスに影響が出ることがあります。最適化のための工夫が必要です。

  • react-sortable-hoc:

    軽量で高速なパフォーマンスを提供し、特に小規模なリストの並べ替えにおいて優れたパフォーマンスを発揮します。

  • sortablejs:

    非常に高いパフォーマンスを誇り、大規模なデータセットや複雑なインターフェースでもスムーズに動作します。

学習曲線

  • react-beautiful-dnd:

    比較的学習しやすく、Reactの知識があればすぐに使い始めることができます。ドキュメントも充実しており、サンプルコードも豊富です。

  • react-sortable-hoc:

    シンプルなAPIを持ち、学習曲線は緩やかです。特に、Reactに慣れている開発者には使いやすいです。

  • sortablejs:

    汎用性が高い分、学習曲線はやや急ですが、ドキュメントが充実しているため、理解しやすいです。

メンテナンス

  • react-beautiful-dnd:

    活発にメンテナンスされており、定期的にアップデートが行われています。バグ修正や機能追加が行われているため、安心して使用できます。

  • react-sortable-hoc:

    メンテナンスは行われていますが、react-beautiful-dndほどの頻度ではありません。安定しているものの、将来的なサポートが不透明な部分もあります。

  • sortablejs:

    非常に活発にメンテナンスされており、コミュニティも活発です。新機能の追加やバグ修正が頻繁に行われています。

選び方: react-beautiful-dnd vs react-sortable-hoc vs sortablejs

  • react-beautiful-dnd:

    このライブラリは、Reactに特化しており、アクセシビリティやドラッグ&ドロップの体験を向上させるための多くの機能を備えています。特に、複雑なドラッグ&ドロップのインターフェースを必要とする場合に適しています。

  • react-sortable-hoc:

    このライブラリは、シンプルで軽量なドラッグ&ドロップ機能を提供します。特に、リストの並べ替えが主な目的である場合に適しており、カスタマイズ性が高いです。

  • sortablejs:

    このライブラリは、Reactに限らず、さまざまなフレームワークで使用できる汎用性の高いソリューションです。パフォーマンスが高く、複雑なドラッグ&ドロップの要件がある場合に適しています。

react-beautiful-dnd のREADME

⚠️ Maintenance & support

This library continues to be relied upon heavily by Atlassian products, but we are focused on other priorities right now and have no current plans for further feature development or improvements.

It will continue to be here on GitHub and we will still make critical updates (e.g. security fixes, if any) as required, but will not be actively monitoring or replying to issues and pull requests.

We recommend that you don’t raise issues or pull requests, as they will not be reviewed or actioned until further notice.


react beautiful dnd logo

react-beautiful-dnd (rbd)

Beautiful and accessible drag and drop for lists with React

CircleCI branch npm

quote application example

Play with this example if you want!

Core characteristics

  • Beautiful and natural movement of items 💐
  • Accessible: powerful keyboard and screen reader support ♿️
  • Extremely performant 🚀
  • Clean and powerful api which is simple to get started with
  • Plays extremely well with standard browser interactions
  • Unopinionated styling
  • No creation of additional wrapper dom nodes - flexbox and focus management friendly!

Get started 👩‍🏫

We have created a free course on egghead.io 🥚 to help you get started with react-beautiful-dnd as quickly as possible.

course-logo

Currently supported feature set ✅

  • Vertical lists ↕
  • Horizontal lists ↔
  • Movement between lists (▤ ↔ ▤)
  • Virtual list support 👾 - unlocking 10,000 items @ 60fps
  • Combining items
  • Mouse 🐭, keyboard 🎹♿️ and touch 👉📱 (mobile, tablet and so on) support
  • Multi drag support
  • Incredible screen reader support ♿️ - we provide an amazing experience for english screen readers out of the box 📦. We also provide complete customisation control and internationalisation support for those who need it 💖
  • Conditional dragging and conditional dropping
  • Multiple independent lists on the one page
  • Flexible item sizes - the draggable items can have different heights (vertical lists) or widths (horizontal lists)
  • Add and remove items during a drag
  • Compatible with semantic <table> reordering - table pattern
  • Auto scrolling - automatically scroll containers and the window as required during a drag (even with keyboard 🔥)
  • Custom drag handles - you can drag a whole item by just a part of it
  • Able to move the dragging item to another element while dragging (clone, portal) - Reparenting your <Draggable />
  • Create scripted drag and drop experiences 🎮
  • Allows extensions to support for any input type you like 🕹
  • 🌲 Tree support through the @atlaskit/tree package
  • A <Droppable /> list can be a scroll container (without a scrollable parent) or be the child of a scroll container (that also does not have a scrollable parent)
  • Independent nested lists - a list can be a child of another list, but you cannot drag items from the parent list into a child list
  • Server side rendering (SSR) compatible - see resetServerContext()
  • Plays well with nested interactive elements by default

Motivation 🤔

react-beautiful-dnd exists to create beautiful drag and drop for lists that anyone can use - even people who cannot see. For a good overview of the history and motivations of the project you can take a look at these external resources:

Not for everyone ✌️

There are a lot of libraries out there that allow for drag and drop interactions within React. Most notable of these is the amazing react-dnd. It does an incredible job at providing a great set of drag and drop primitives which work especially well with the wildly inconsistent html5 drag and drop feature. react-beautiful-dnd is a higher level abstraction specifically built for lists (vertical, horizontal, movement between lists, nested lists and so on). Within that subset of functionality react-beautiful-dnd offers a powerful, natural and beautiful drag and drop experience. However, it does not provide the breadth of functionality offered by react-dnd. So react-beautiful-dnd might not be for you depending on what your use case is.

Documentation 📖

About 👋

Sensors 🔉

The ways in which somebody can start and control a drag

API 🏋️‍

diagram

Guides 🗺

Patterns 👷‍

Support 👩‍⚕️

Read this in other languages 🌎

Creator ✍️

Alex Reardon @alexandereardon

Alex is no longer personally maintaning this project. The other wonderful maintainers are carrying this project forward.

Maintainers

Collaborators 🤝