From 87c8caa8818c1cd1a02963d488563c7cb4320a06 Mon Sep 17 00:00:00 2001 From: SpikeySanju Date: Tue, 12 Nov 2024 23:17:12 +0530 Subject: [PATCH] docs: add example for custom classes in drag and drop states --- README.md | 116 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) diff --git a/README.md b/README.md index 3cd65c5..cccfa41 100644 --- a/README.md +++ b/README.md @@ -285,6 +285,121 @@ interface DragDropState { ``` +### Custom Classes for Drag and Drop States + +```svelte + + +
+
+

Sortable List

+

Drag and drop items to reorder them in the list.

+
+ +
+
+
+ {#each items as item, index (item.id)} +
+
+

+ {item.title} +

+ + {item.priority} + +
+

+ {item.description} +

+
+ {/each} +
+
+
+
+ + +``` + ### Additional Examples - **[Kanban Board](https://github.com/thisuxhq/SvelteDnD/blob/main/src/routes/+page.svelte)**: Find the example in `src/routes/+page.svelte`. @@ -292,6 +407,7 @@ interface DragDropState { - **[Grid Sort](https://github.com/thisuxhq/SvelteDnD/blob/main/src/routes/grid-sort/+page.svelte)**: Check out the implementation in `src/routes/grid-sort/+page.svelte`. - **[Horizontal Scroll](https://github.com/thisuxhq/SvelteDnD/blob/main/src/routes/horizontal-scroll/+page.svelte)**: See how it works in `src/routes/horizontal-scroll/+page.svelte`. - **[Nested Containers](https://github.com/thisuxhq/SvelteDnD/blob/main/src/routes/nested/+page.svelte)**: Explore the example in `src/routes/nested/+page.svelte`. +- **[Custom Classes](https://github.com/thisuxhq/SvelteDnD/blob/main/src/routes/custom-classes/+page.svelte)**: Explore the example in `src/routes/custom-classes/+page.svelte`. ## Styling