Sortable - @dnd-kit – Documentation
docs.dndkit.com · 2,990 words · saved by 1 readers
The sortable preset provides the building blocks to build sortable interfaces.
Installation To get started, install the sortable preset via npm or yarn : npm install @dnd-kit/sortable Overview If you’re eager to get started right away, here’s the code you’ll need: App.jsx SortableItem.jsx import React, {useState} from 'react' ; import { DndContext, closestCenter, KeyboardSensor, PointerSensor, useSensor, useSensors, } from '@dnd-kit/core' ; import { arrayMove, SortableContext, sortableKeyboardCoordinates, verticalListSortingStrategy, } from '@dnd-kit/sortable' ; import {SortableItem} from './SortableItem' ; function App () { const [items, setItems] = useState ([ 1 , 2 ,
related reading
- Getting Started - Legacy | dnd kitdocs.dndkit.com
- Draggable - Legacy | dnd kitdocs.dndkit.com
- Drag Overlay - Legacy | dnd kitdocs.dndkit.com
- Installation - Legacy | dnd kitdocs.dndkit.com
- DndContext - Legacy | dnd kitdocs.dndkit.com
- srclsacred.computer
- srclsacred.computer
- Build your own Reactpomb.us
- A Call for New Aestheticsnewaesthetics.art
- Grainradgrainrad.com
- Tutorial: Tic-Tac-Toe – Reactreactjs.org
- A Call for New Aestheticsnewaesthetics.art