PHPackages                             buibr/yii2-sortable - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. buibr/yii2-sortable

ActiveYii2-extension

buibr/yii2-sortable
===================

Create sortable lists and grids using HTML5 drag and drop API for Yii 2.0.

v1.2.2(7y ago)037BSD-3-ClauseJavaScript

Since Oct 5Pushed 7y ago1 watchersCompare

[ Source](https://github.com/buibr/yii2-sortable)[ Packagist](https://packagist.org/packages/buibr/yii2-sortable)[ Docs](https://github.com/kartik-v/yii2-sortable)[ RSS](/packages/buibr-yii2-sortable/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (1)Versions (6)Used By (0)

 [ ![Krajee Logo](https://camo.githubusercontent.com/4addfbb3869c3fc7d79befea4f06d9cf3655a686fb503df0da1d725859cfdef9/687474703a2f2f6b617274696b2d762e6769746875622e696f2f626f6f7473747261702d66696c65696e7075742d73616d706c65732f73616d706c65732f6b72616a65652d6c6f676f2d622e706e67) ](http://demos.krajee.com "Krajee Demos")
 yii2-sortable ---

 [ ![Donate](https://camo.githubusercontent.com/4af77d425ca202e55ab3d711b438e238ded194735bc345a019ac060e03e26227/687474703a2f2f6b617274696b2d762e6769746875622e696f2f626f6f7473747261702d66696c65696e7075742d73616d706c65732f73616d706c65732f646f6e6174652e706e67) ](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=DTP3NZQ6G2AYU "Donate via Paypal")
=================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#------------------------yii2-sortable--------------------)

[![Stable Version](https://camo.githubusercontent.com/dc2490e8408d92df3b2a7434479e838dcc960caf7628b97dbbd6666dd89bc605/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d7769646765742d736f727461626c652f762f737461626c65)](https://packagist.org/packages/kartik-v/yii2-widget-sortable)[![Unstable Version](https://camo.githubusercontent.com/f93dc06f7a066e626640fe85759fcc80e55904e8db3bdc9069f3d99d9c2dd6f0/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d7769646765742d736f727461626c652f762f756e737461626c65)](https://packagist.org/packages/kartik-v/yii2-widget-sortable)[![License](https://camo.githubusercontent.com/08716b2543e80459883c1c995cf9935ae8b5bff272f9e42b1eabe46e0c7233ba/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d736f727461626c652f6c6963656e7365)](https://packagist.org/packages/kartik-v/yii2-sortable)[![Total Downloads](https://camo.githubusercontent.com/ce69d093bb1b681707197d4e319f9535ccc2c0568de1574074064f7c77b7ce47/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d736f727461626c652f646f776e6c6f616473)](https://packagist.org/packages/kartik-v/yii2-sortable)[![Monthly Downloads](https://camo.githubusercontent.com/125c81055fa90daf052f3e714e22397bf5570a7c17b8969ddb8eab5f11cd8774/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d736f727461626c652f642f6d6f6e74686c79)](https://packagist.org/packages/kartik-v/yii2-sortable)[![Daily Downloads](https://camo.githubusercontent.com/7a26413d14f2973b64e7e26a42135d12fc52261584eaa81364ec255fd9d41602/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d736f727461626c652f642f6461696c79)](https://packagist.org/packages/kartik-v/yii2-sortable)

A Yii 2.0 widget that allows you to create sortable lists and grids and manipulate them using simple drag and drop. It is based on the lightweight [html5sortable](https://github.com/voidberg/html5sortable) jQuery plugin, which uses native HTML5 API for drag and drop. It is a leaner alternative for the JUI Sortable plugin and offers very similar functionality. The **yii2-sortable widget** offers these features:

- Less than 1KB of javascript used (minified and gzipped).
- Built using native HTML5 drag and drop API.
- Supports both list and grid style layouts.
- Similar API and behaviour to jquery-ui sortable plugin.
- Works in IE 5.5+, Firefox 3.5+, Chrome 3+, Safari 3+ and, Opera 12+.

### Demo

[](#demo)

You can see detailed [documentation](http://demos.krajee.com/sortable) on usage of the extension.

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

> NOTE: Check the [composer.json](https://github.com/kartik-v/yii2-sortable/blob/master/composer.json) for this extension's requirements and dependencies. Read this [web tip /wiki](http://webtips.krajee.com/setting-composer-minimum-stability-application/) on setting the `minimum-stability` settings for your application's composer.json.

Either run

```
$ php composer.phar require kartik-v/yii2-sortable "@dev"

```

or add

```
"kartik-v/yii2-sortable": "@dev"

```

to the `require` section of your `composer.json` file.

Usage
-----

[](#usage)

### Sortable

[](#sortable)

```
use kartik\sortable\Sortable;
echo Sortable::widget([
    'type' => Sortable::TYPE_LIST,
    'items' => [
        ['content' => 'Item # 1'],
        ['content' => 'Item # 2'],
        ['content' => 'Item # 3'],
    ]
]);
```

License
-------

[](#license)

**yii2-sortable** is released under the BSD-3-Clause License. See the bundled `LICENSE.md` for details.

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 93.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~366 days

Total

5

Last Release

2770d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3f010dfc3a6587d208aa1d9c7bec81d58f21fbf9100b1fce35b5ae05b747d5e5?d=identicon)[buibr](/maintainers/buibr)

---

Top Contributors

[![kartik-v](https://avatars.githubusercontent.com/u/3592619?v=4)](https://github.com/kartik-v "kartik-v (30 commits)")[![cornernote](https://avatars.githubusercontent.com/u/51875?v=4)](https://github.com/cornernote "cornernote (1 commits)")[![zmedanic](https://avatars.githubusercontent.com/u/5254870?v=4)](https://github.com/zmedanic "zmedanic (1 commits)")

---

Tags

jquerysortableyii2extensionwidgetbootstraprange

### Embed Badge

![Health badge](/badges/buibr-yii2-sortable/health.svg)

```
[![Health](https://phpackages.com/badges/buibr-yii2-sortable/health.svg)](https://phpackages.com/packages/buibr-yii2-sortable)
```

###  Alternatives

[kartik-v/yii2-sortable

Create sortable lists and grids using HTML5 drag and drop API for Yii 2.0.

433.8M13](/packages/kartik-v-yii2-sortable)[kartik-v/yii2-sortable-input

Sortable input widget based on yii2-sortable extension.

24660.4k2](/packages/kartik-v-yii2-sortable-input)[kartik-v/yii2-date-range

An advanced Yii 2 date range picker input for based on bootstrap-daterangepicker plugin.

894.4M42](/packages/kartik-v-yii2-date-range)[kartik-v/yii2-widget-rating

A Yii2 widget for the simple yet powerful bootstrap-star-rating plugin with fractional rating support (sub repo split from yii2-widgets)

444.1M8](/packages/kartik-v-yii2-widget-rating)[kartik-v/yii2-widget-timepicker

Enhanced Yii2 wrapper for the bootstrap timepicker plugin (sub repo split from yii2-widgets)

404.9M14](/packages/kartik-v-yii2-widget-timepicker)[kartik-v/yii2-widget-switchinput

A Yii2 wrapper widget for the Bootstrap Switch plugin to use checkboxes &amp; radios as toggle switchinputes (sub repo split from yii2-widgets)

384.4M13](/packages/kartik-v-yii2-widget-switchinput)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
