Skip to content

Sortable List

Rows you drag into a new order. The lifted row grows by 2% and casts a hairline shadow while its grip runs hot; the others part on springs as it passes their middles, and the drop settles into the gap with a tiny overshoot.

Download
Customize

Space lifts, the arrows move and Space drops, with every step announced; on touch a long press lifts so the page still scrolls.

Install

npx shadcn@latest add https://obsydeui.com/r/sortable-list.json

Usage

Import it from where the CLI puts it, or copy the files below by hand.

import { SortableList } from '@/components/obsyde/ember/sortable-list/SortableList';

export function Example() {
  return (
    <SortableList />
  );
}

Files

Plain React, TypeScript and CSS. No dependencies. The download keeps these paths.

  • ember/sortable-list/SortableList.tsxcomponent
  • ember/sortable-list/sortable-list.cssstyles
  • ember/sortable-list/SortableListDemo.tsxdemo
  • ember/kit2-kit/kit.tsshared
  • ember/shared/spring.tsshared
  • ember/shared/accent.tsshared
  • ember/shared/ember.cssshared

API

PropTypeDefault
accentAccent'ember' | 'volt' | 'arc''ember'
countRowsnumber6
numberedNumberedbooleantrue
sizeSize'md' | 'sm''md'