Skip to main content

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

ExampleFeaturesLinks
Color Drag & DropFree-form DnD, drop acceptance, hover styles, snap alignment▶️ Live demo · Source
Reorderable ListDraxList, animation presets, auto-scroll, inactive styling▶️ Live demo · Source
Reorderable GridSortable grid, multi-column, numColumns▶️ Live demo · Source
Drag HandlesDraxHandle, only grip starts drag▶️ Live demo · Source
Drag BoundsdragBoundsRef, constrained drag area▶️ Live demo · Source
Collision ModesCenter vs Intersect vs Contain▶️ Live demo · Source
Cross-List ReorderFlashList + LegendList + FlatList cross-container drag▶️ Live demo · Source
Knight MovesChess knight puzzle, conditional acceptance▶️ Live demo · Source
ScrollingDraxScrollView, auto-scroll, drag from scroll▶️ Live demo · Source
Stress Test100 items in a sortable list▶️ Live demo · Source