Drag and drop

The drag and drop component allows users to reposition, rearrange, and group items into more relevant and appropriate layouts.

Info alert:Beta feature

This beta component is currently under review and is still open for further evolution. It is available for use in product. Beta components are considered for promotion on a quarterly basis. Please join in and give us your feedback or submit any questions on the PatternFly forum or via Slack. To learn more about the process, visit our about page or our Beta components page on GitHub.

Examples

Basic

Item
Item
Item
Item
Item
Item
Item
Item

Dragging

Item
Item
Item
Item
Item
Item
Item
Item

Drag outside

Item
Item
Item
Item
Item
Item
Item
Item

Documentation

Usage

Class
Applied to
Outcome
.pf-v6-c-draggable
*
Initiates a draggable element.
.pf-v6-c-droppable
*
Initiates a droppable element.
.pf-m-dragging
.pf-v6-c-draggable, .pf-v6-c-droppable
Indicates a draggable and droppable element are in the dragging state.
.pf-m-drag-outside
.pf-v6-c-draggable, .pf-v6-c-droppable
Indicates a draggable element is dragged outside of a droppable element.

CSS variables

Expand or collapse columnSelectorVariableValue
:where(:root, .pf-v6-c-draggable)--pf-v6-c-draggable--Cursor
auto
:where(:root, .pf-v6-c-draggable)--pf-v6-c-draggable--m-dragging--Cursor
grabbing
:where(:root, .pf-v6-c-draggable)--pf-v6-c-draggable--m-dragging--BoxShadow
0px 4px 8px 0px rgba(0, 0, 0, 0.1200)
:where(:root, .pf-v6-c-draggable)--pf-v6-c-draggable--m-dragging--BackgroundColor
transparent
:where(:root, .pf-v6-c-draggable)--pf-v6-c-draggable--m-dragging--after--BorderWidth
1px
:where(:root, .pf-v6-c-draggable)--pf-v6-c-draggable--m-dragging--after--BorderColor
(In light theme) #0066cc
:where(:root, .pf-v6-c-draggable)--pf-v6-c-draggable--m-dragging--after--BorderRadius
6px
:where(:root, .pf-v6-c-draggable)--pf-v6-c-draggable--m-drag-outside--Cursor
not-allowed
:where(:root, .pf-v6-c-draggable)--pf-v6-c-draggable--m-drag-outside--after--BorderColor
(In light theme) #b1380b
.pf-v6-c-draggable.pf-m-dragging--pf-v6-c-draggable--Cursor
grabbing
.pf-v6-c-draggable.pf-m-drag-outside--pf-v6-c-draggable--m-dragging--Cursor
not-allowed
.pf-v6-c-draggable.pf-m-drag-outside--pf-v6-c-draggable--m-dragging--after--BorderColor
(In light theme) #b1380b
:where(:root, .pf-v6-c-droppable)--pf-v6-c-droppable--before--BackgroundColor
transparent
:where(:root, .pf-v6-c-droppable)--pf-v6-c-droppable--before--Opacity
0
:where(:root, .pf-v6-c-droppable)--pf-v6-c-droppable--after--BorderWidth
0
:where(:root, .pf-v6-c-droppable)--pf-v6-c-droppable--after--BorderColor
transparent
:where(:root, .pf-v6-c-droppable)--pf-v6-c-droppable--m-dragging--before--BackgroundColor
(In light theme) #ffffff
:where(:root, .pf-v6-c-droppable)--pf-v6-c-droppable--m-dragging--before--Opacity
.6
:where(:root, .pf-v6-c-droppable)--pf-v6-c-droppable--m-dragging--after--BorderWidth
1px
:where(:root, .pf-v6-c-droppable)--pf-v6-c-droppable--m-dragging--after--BorderColor
(In light theme) #0066cc
:where(:root, .pf-v6-c-droppable)--pf-v6-c-droppable--m-dragging--after--BorderRadius
6px
:where(:root, .pf-v6-c-droppable)--pf-v6-c-droppable--m-drag-outside--after--BorderColor
(In light theme) #b1380b
.pf-v6-c-droppable.pf-m-dragging--pf-v6-c-droppable--before--BackgroundColor
(In light theme) #ffffff
.pf-v6-c-droppable.pf-m-dragging--pf-v6-c-droppable--before--Opacity
.6
.pf-v6-c-droppable.pf-m-dragging--pf-v6-c-droppable--after--BorderWidth
1px
.pf-v6-c-droppable.pf-m-dragging--pf-v6-c-droppable--after--BorderColor
(In light theme) #0066cc
.pf-v6-c-droppable.pf-m-drag-outside--pf-v6-c-droppable--m-dragging--after--BorderColor
(In light theme) #b1380b