Skip to content

Latest commit

 

History

History

draggable

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

@zendeskgarden/react-draggable npm version

This package includes components related to drag and drop in the Garden Design System.

Installation

npm install @zendeskgarden/react-draggable

# Peer Dependencies - Also Required
npm install react react-dom styled-components @zendeskgarden/react-theming

Usage

import { ThemeProvider } from '@zendeskgarden/react-theming';
import { Draggable, DraggableList, Dropzone } from '@zendeskgarden/react-draggable';

/**
 * Place a `ThemeProvider` at the root of your React application
 */
<ThemeProvider>
  <DraggableList>
    <DraggableList.Item>
      <Draggable>
        <Draggable.Grip />
        <Draggable.Content>Petunia</Draggable.Content>
      </Draggable>
    </DraggableList.Item>
  </DraggableList>

  <Dropzone>
    <Dropzone.Message>Drag items here</Dropzone.Message>
  </Dropzone>
</ThemeProvider>;