Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/react-beautiful-dnd

Package Overview
Dependencies
Maintainers
1
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/react-beautiful-dnd

TypeScript definitions for react-beautiful-dnd

  • 13.1.8
  • ts4.6
  • ts4.7
  • ts4.8
  • ts4.9
  • ts5.0
  • ts5.1
  • ts5.2
  • ts5.3
  • ts5.4
  • ts5.5
  • ts5.6
  • ts5.7
  • ts5.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is @types/react-beautiful-dnd?

The @types/react-beautiful-dnd package provides TypeScript type definitions for react-beautiful-dnd, a library that helps you create beautiful, accessible drag and drop lists with ease. These type definitions allow TypeScript developers to use react-beautiful-dnd in their projects with the benefits of type checking and IntelliSense support.

What are @types/react-beautiful-dnd's main functionalities?

Draggable

The Draggable component allows individual elements to be draggable. It requires a draggableId and an index prop. The children function provides 'provided' and 'snapshot' objects that contain the necessary props and state to control the element.

{"import { Draggable } from 'react-beautiful-dnd';\n\n<Draggable draggableId='draggable-1' index={0}>\n  {(provided, snapshot) => (\n    <div\n      ref={provided.innerRef}\n      {...provided.draggableProps}\n      {...provided.dragHandleProps}\n      style={provided.draggableProps.style}\n    >\n      Drag me!\n    </div>\n  )}\n</Draggable>"}

Droppable

The Droppable component defines an area where Draggable items can be dropped. It takes a droppableId prop and its children function provides 'provided' and 'snapshot' objects to manage the drop area.

{"import { Droppable } from 'react-beautiful-dnd';\n\n<Droppable droppableId='droppable-1'>\n  {(provided, snapshot) => (\n    <div\n      ref={provided.innerRef}\n      {...provided.droppableProps}\n    >\n      Drop items here\n      {provided.placeholder}\n    </div>\n  )}\n</Droppable>"}

DragDropContext

The DragDropContext component wraps the Draggable and Droppable components and provides a context for drag and drop operations. It takes an onDragEnd callback that is called when a drag operation is completed.

{"import { DragDropContext } from 'react-beautiful-dnd';\n\n<DragDropContext onDragEnd={handleDragEnd}>\n  {/* Draggable and Droppable components go here */}\n</DragDropContext>"}

Other packages similar to @types/react-beautiful-dnd

FAQs

Package last updated on 28 Dec 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc