Skip to content

Conversation

snowystinger
Copy link
Member

@snowystinger snowystinger commented Aug 20, 2025

Closes #8688

Not sure if there are enough uses to warrant it. I updated any places in our stories/docs, which was two places.

Edit:
Talked about with team, this moves us closer to monopackages, which is the direction we'd like to head.

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

🧢 Your Project:

@rspbot
Copy link

rspbot commented Aug 20, 2025

@rspbot
Copy link

rspbot commented Aug 20, 2025

## API Changes

react-aria-components

/react-aria-components:useDrag

+useDrag {
+  options: DragOptions
+  returnVal: undefined
+}

/react-aria-components:useDrop

+useDrop {
+  options: DropOptions
+  returnVal: undefined
+}

/react-aria-components:DragOptions

+DragOptions {
+  getAllowedDropOperations?: () => Array<DropOperation>
+  getItems: () => Array<DragItem>
+  hasDragButton?: boolean
+  isDisabled?: boolean
+  onDragEnd?: (DragEndEvent) => void
+  onDragMove?: (DragMoveEvent) => void
+  onDragStart?: (DragStartEvent) => void
+  preview?: RefObject<DragPreviewRenderer | null>
+}

/react-aria-components:DragResult

+DragResult {
+  dragButtonProps: AriaButtonProps
+  dragProps: HTMLAttributes<HTMLElement>
+  isDragging: boolean
+}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

useDrag should be exposed in react-aria-components
4 participants