Examples
The example/ directory contains an Expo Router app with 10 screens demonstrating all Drax features. Each example below includes a description, key concepts, and the full source code.
Running the Examples
cd example && yarn start
Use --clear flag after library source changes to bust the Metro cache.
Try It Live
Visit the live interactive demo to try the examples in your browser (Expo web export).
Example Screens
| Example | Features |
|---|---|
| Color Drag & Drop | Free-form DnD, drop acceptance, hover styles, snap alignment |
| Reorderable List | DraxList, animation presets, auto-scroll |
| Reorderable Grid | Sortable grid, multi-column, numColumns |
| Drag Handles | DraxHandle, only grip starts drag |
| Drag Bounds | dragBoundsRef, constrained drag area |
| Collision Modes | Center vs Intersect vs Contain |
| Kanban Board | Cross-container drag, useSortableBoard |
| Knight Moves | Chess knight puzzle, conditional acceptance |
| Scrolling | DraxScrollView, auto-scroll, drag from scroll |
| Stress Test | 100 items in a sortable list |