URLs

Helpers to make working with native URL data easier

containsURLs

Useful to know whether URLs ("text/uri-list") is being dragged.

Keep in mind:

  • it is possible for multiple urls to be dragged at the same time
  • multiple pieces of data can be dragged at once
import { containsURLs } from '@atlaskit/pragmatic-drag-and-drop/external/url';

dropTargetForExternal({
    element: myElement,
    canDrop: containsURLs,
});

monitorForExternal({
    canMonitor: containsURLs,
});

getURLs

A helper to extract URL data ("text/uri-list") from drop data. When there are no URLs, getURLs() will return an empty array ([]).

import { getURLs } from '@atlaskit/pragmatic-drag-and-drop/external/url';

dropTargetForExternal({
    element: myElement,
    onDrop({ source }) {
        const urls: string[] = getURLs({ source });
    },
});

monitorForExternal({
    onDrop({ source }) {
        const urls: string[] = getURLs({ source });
    },
});
Was this page helpful?
We use this feedback to improve our documentation.
  • Design system
    • Get started
    • Foundations
    • Components
    • Rovo UI
    • Tools
    • Release phases
    • Contact us
© 2026 AtlassianTrademark, (opens new window)Privacy, (opens new window)License