PHPackages                             mrshanebarron/sortable-list - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. mrshanebarron/sortable-list

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

mrshanebarron/sortable-list
===========================

Drag and drop sortable list for Laravel - supports Livewire and Vue

v1.0.3(4mo ago)09MITBladePHP ^8.1

Since Dec 14Pushed 4mo agoCompare

[ Source](https://github.com/mrshanebarron/sortable-list)[ Packagist](https://packagist.org/packages/mrshanebarron/sortable-list)[ RSS](/packages/mrshanebarron-sortable-list/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (5)Used By (0)

Sortable List
=============

[](#sortable-list)

Drag and drop reorderable lists for Laravel applications. Supports vertical and horizontal directions, optional drag handles, and emits reorder events. Works with Livewire and Vue 3.

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

[](#installation)

```
composer require mrshanebarron/sortable-list

```

Livewire Usage
--------------

[](#livewire-usage)

### Basic Usage

[](#basic-usage)

```
@php
$items = [
    ['id' => 1, 'title' => 'First Item'],
    ['id' => 2, 'title' => 'Second Item'],
    ['id' => 3, 'title' => 'Third Item'],
];
@endphp

```

### With Drag Handle

[](#with-drag-handle)

```

```

### Horizontal Direction

[](#horizontal-direction)

```

```

### With Wire Model

[](#with-wire-model)

```

```

### Livewire Props

[](#livewire-props)

PropTypeDefaultDescription`items`array`[]`Array of items with `id` and `title` keys (modelable)`handle`boolean`false`Show drag handle instead of full-item drag`direction`string`'vertical'`Direction: `vertical` or `horizontal`### Item Structure

[](#item-structure)

```
$items = [
    ['id' => 1, 'title' => 'Homepage Banner', 'description' => 'Image'],
    ['id' => 2, 'title' => 'Featured Products', 'description' => 'Collection'],
    ['id' => 3, 'title' => 'Newsletter Signup', 'description' => 'Form'],
];

```

### Events

[](#events)

```

```

The `items-reordered` event includes the reordered items array.

Vue 3 Usage
-----------

[](#vue-3-usage)

### Setup

[](#setup)

```
import { SbSortableList } from './vendor/sb-sortable-list';
app.component('SbSortableList', SbSortableList);

```

### Basic Usage

[](#basic-usage-1)

```

import { ref } from 'vue';

const items = ref([
  { id: 1, title: 'First' },
  { id: 2, title: 'Second' },
  { id: 3, title: 'Third' },
]);

```

### With Options

[](#with-options)

```

```

### Vue Props

[](#vue-props)

PropTypeDefaultDescription`modelValue`Array`[]`v-model binding for items`handle`Boolean`false`Show drag handle`direction`String`'vertical'`Layout direction### Events

[](#events-1)

EventPayloadDescription`update:modelValue`arrayEmitted when items are reordered`reordered`arrayEmitted with new order after drag endsHandling Reorder in Backend
---------------------------

[](#handling-reorder-in-backend)

```
// In your Livewire component
public array $items = [];

#[On('items-reordered')]
public function handleReorder(array $items): void
{
    foreach ($items as $index => $item) {
        Model::where('id', $item['id'])->update(['order' => $index]);
    }
}

```

Styling
-------

[](#styling)

The sortable list includes:

- Smooth drag animations
- Visual feedback during drag
- Optional grab cursor on handles
- Border and shadow effects

Requirements
------------

[](#requirements)

- PHP 8.1+
- Laravel 10, 11, or 12
- Tailwind CSS 3.x
- Alpine.js (for drag functionality)

License
-------

[](#license)

MIT License

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance74

Regular maintenance activity

Popularity4

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

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 ~0 days

Total

4

Last Release

146d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7a38dc9b4ccc180ee3e9df8879f8747ea9dbf36812c6546827fe504fa8993eb8?d=identicon)[mrshanebarron](/maintainers/mrshanebarron)

### Embed Badge

![Health badge](/badges/mrshanebarron-sortable-list/health.svg)

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

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M686](/packages/barryvdh-laravel-ide-helper)[orchestra/canvas

Code Generators for Laravel Applications and Packages

21017.2M157](/packages/orchestra-canvas)[illuminate/pipeline

The Illuminate Pipeline package.

9446.6M211](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M862](/packages/illuminate-pagination)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)

PHPackages © 2026

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