> For AI agents: the complete documentation index is available at https://gultyayev.github.io/ngx-virtual-dnd/llms.txt, the full documentation bundle is available at https://gultyayev.github.io/ngx-virtual-dnd/llms-full.txt.

# API overview

Everything is exported from `ngx-virtual-dnd`. Most apps only use the exports in the first two tables.

## Start here

| Export                                                                                                                                                | Use it to                                                                  |
| ----------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
| [`VirtualSortableListComponent`](https://gultyayev.github.io/ngx-virtual-dnd/api/components.md#virtualsortablelistcomponent) (`<vdnd-sortable-list>`) | Render a sortable virtual list: droppable, scroller and placeholder in one |
| [`DraggableDirective`](https://gultyayev.github.io/ngx-virtual-dnd/api/directives.md#draggabledirective) (`[vdndDraggable]`)                          | Make an item draggable                                                     |
| [`DroppableGroupDirective`](https://gultyayev.github.io/ngx-virtual-dnd/api/directives.md#droppablegroupdirective) (`[vdndGroup]`)                    | Name the group that lets lists exchange items                              |
| [`DragPreviewComponent`](https://gultyayev.github.io/ngx-virtual-dnd/api/components.md#dragpreviewcomponent) (`<vdnd-drag-preview>`)                  | Render the element that follows the pointer (place it once)                |
| [`DropEvent`](https://gultyayev.github.io/ngx-virtual-dnd/api/events.md#dropevent)                                                                    | Read where an item came from and where it was dropped                      |
| [`moveItem`, `reorderItems`, `applyMove`](https://gultyayev.github.io/ngx-virtual-dnd/api/utilities.md)                                               | Apply a drop to your signals or immutable state                            |

## Events and helpers

| Export                                                                                                   | Use it to                                                               |
| -------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| [`DragStartEvent`](https://gultyayev.github.io/ngx-virtual-dnd/api/events.md#dragstartevent)             | React to a drag starting (`(dragStart)` on a draggable)                 |
| [`DragEndEvent`](https://gultyayev.github.io/ngx-virtual-dnd/api/events.md#dragendevent)                 | React to every drag ending, dropped or not (`(dragEnd)` on a draggable) |
| [`PlaceholderMoveEvent`](https://gultyayev.github.io/ngx-virtual-dnd/api/events.md#placeholdermoveevent) | Give feedback on every placeholder step (haptics, announcements)        |
| [`isNoOpDrop`, `insertAt`, `removeAt`](https://gultyayev.github.io/ngx-virtual-dnd/api/utilities.md)     | Skip drops back to the same place, or edit arrays immutably             |
| [`DragStateService`](https://gultyayev.github.io/ngx-virtual-dnd/api/services.md#dragstateservice)       | Read the current drag anywhere in the app, as signals                   |
| [`VDND_ANIMATION_CONFIG`](https://gultyayev.github.io/ngx-virtual-dnd/api/types.md#injection-tokens)     | Turn on shift and drop animations                                       |
| [`AutoScrollConfig`](https://gultyayev.github.io/ngx-virtual-dnd/api/types.md#configuration)             | Type of the `autoScrollConfig` input                                    |

## Other list building blocks

Use these instead of `<vdnd-sortable-list>` when you need your own markup or page-level scrolling. See [Choosing a component](https://gultyayev.github.io/ngx-virtual-dnd/guide/essentials/choosing-a-component.md).

| Export                                                                                                                                                       | Use it to                                                         |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------- |
| [`DroppableDirective`](https://gultyayev.github.io/ngx-virtual-dnd/api/directives.md#droppabledirective) (`[vdndDroppable]`)                                 | Make your own element a drop target                               |
| [`VirtualScrollContainerComponent`](https://gultyayev.github.io/ngx-virtual-dnd/api/components.md#virtualscrollcontainercomponent) (`<vdnd-virtual-scroll>`) | Virtual scroller inside a `vdndDroppable`, with scrolling methods |
| [`ScrollableDirective`](https://gultyayev.github.io/ngx-virtual-dnd/api/directives.md#scrollabledirective) (`[vdndScrollable]`)                              | Mark the element that scrolls, for page-level scrolling           |
| [`VirtualContentComponent`](https://gultyayev.github.io/ngx-virtual-dnd/api/components.md#virtualcontentcomponent) (`<vdnd-virtual-content>`)                | Virtual rows inside a `vdndScrollable`                            |
| [`ContentHeaderDirective`](https://gultyayev.github.io/ngx-virtual-dnd/api/directives.md#contentheaderdirective) (`[vdndContentHeader]`)                     | Measure a header above the rows of `<vdnd-virtual-content>`       |
| [`VirtualForDirective`](https://gultyayev.github.io/ngx-virtual-dnd/api/directives.md#virtualfordirective) (`*vdndVirtualFor`)                               | Render only the visible items, as a structural directive          |
| [`VirtualViewportComponent`](https://gultyayev.github.io/ngx-virtual-dnd/api/components.md#virtualviewportcomponent) (`<vdnd-virtual-viewport>`)             | Self-scrolling container for `*vdndVirtualFor`                    |

## Advanced

Most apps never need these. They exist for custom containers and low-level integrations.

| Export                                                                                                                                                                                      | What it is                                                             |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- |
| [`AutoScrollService`](https://gultyayev.github.io/ngx-virtual-dnd/api/services.md#autoscrollservice)                                                                                        | Edge scrolling during drags                                            |
| [`PositionCalculatorService`, `ElementCloneService`, `KeyboardDragService`, `OverlayContainerService`](https://gultyayev.github.io/ngx-virtual-dnd/api/services.md#advanced-services)       | Internals exported for customization                                   |
| [`PlaceholderComponent`](https://gultyayev.github.io/ngx-virtual-dnd/api/components.md#placeholdercomponent) (`<vdnd-placeholder>`)                                                         | A drop indicator you render yourself; the built-in lists do not use it |
| [`DragPlaceholderComponent`](https://gultyayev.github.io/ngx-virtual-dnd/api/components.md#dragplaceholdercomponent) (`<vdnd-drag-placeholder>`)                                            | The placeholder the built-in lists render                              |
| [`VirtualScrollStrategy`, `FixedHeightStrategy`, `DynamicHeightStrategy`](https://gultyayev.github.io/ngx-virtual-dnd/api/types.md#strategies)                                              | Virtual scroll math, for building your own container                   |
| [`VDND_SCROLL_CONTAINER`, `VDND_VIRTUAL_VIEWPORT`, `VDND_GROUP_TOKEN`](https://gultyayev.github.io/ngx-virtual-dnd/api/types.md#injection-tokens)                                           | Tokens the library's containers provide                                |
| [Template contexts](https://gultyayev.github.io/ngx-virtual-dnd/api/types.md#template-contexts) and [drag state types](https://gultyayev.github.io/ngx-virtual-dnd/api/types.md#drag-state) | Types of template variables and of `DragStateService` values           |
| [`END_OF_LIST`, `INITIAL_DRAG_STATE`](https://gultyayev.github.io/ngx-virtual-dnd/api/types.md#constants)                                                                                   | Constants. `END_OF_LIST` is deprecated                                 |
