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(6mo ago)09MITBladePHP ^8.1

Since Dec 14Pushed 6mo 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 today

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

32

—

LowBetter than 69% of packages

Maintenance67

Regular maintenance activity

Popularity4

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity47

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

200d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/193358540?v=4)[Mr Shane Barron](/maintainers/mrshanebarron)[@mrshanebarron](https://github.com/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

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M11](/packages/renatomarinho-laravel-page-speed)[illuminate/pagination

The Illuminate Pagination package.

12234.1M1.0k](/packages/illuminate-pagination)[illuminate/pipeline

The Illuminate Pipeline package.

9349.2M282](/packages/illuminate-pipeline)[illuminate/redis

The Illuminate Redis package.

8314.6M375](/packages/illuminate-redis)[illuminate/cookie

The Illuminate Cookie package.

244.6M136](/packages/illuminate-cookie)

PHPackages © 2026

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