Carregando…
Carregando…
Carregando…Drag-and-drop reorderable list with a keyboard-accessible handle (arrow keys/Home/End).
$ npx kikitocn add sortable-listimport { SortableList } from "@/components/ui/cn/sortable-list/SortableList";
export function SortableListExample() {
return (
<SortableList />
);
}| Prop | Tipo | Padrão | Descrição |
|---|---|---|---|
items* | SortableItem[] | — | Array de { id, content } para ordenar |
onChange | (items: SortableItem[]) => void | — | Callback após reordenar |
disabled | boolean | false | Desabilitar arrasto e o grip por teclado |
className | string | — | Classes CSS extras |
style | React.CSSProperties | — | Estilos inline extras |
Drag to reorder (mouse) ou setas ↑/↓ no grip (teclado)
Disabled