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
- DndContext - Legacy | dnd kitdocs.dndkit.com
- Installation - Legacy | dnd kitdocs.dndkit.com
- Draggable - Legacy | dnd kitdocs.dndkit.com
- Drag Overlay - Legacy | dnd kitdocs.dndkit.com
- Getting Started - Legacy | dnd kitdocs.dndkit.com
- Raindrop.ioapp.raindrop.io
- Chloe's Gardenchloeyan.me
- A Comprehensive Mechanistic Interpretability Explainer & Glossary - Dynalistdynalist.io
- SortUI — Premium Figma & Framer UI Kitssortui.company
- Bastiat's famous Candlestick makers' Petitionbastiat.org
- srclsacred.computer
- Anime.js | JavaScript Animation Engineanimejs.com