Skip to content

Latest commit

 

History

History
35 lines (21 loc) · 931 Bytes

File metadata and controls

35 lines (21 loc) · 931 Bytes

BlockMover

BlockMover component allows moving blocks inside the editor using up and down buttons.

Block mover screenshot

Usage

Shows the block mover buttons in the block toolbar.

import { BlockMover } from '@wordpress/block-editor';
const MyMover = () => <BlockMover clientIds={ [ clientId ] } />;

Props

clientIds

The IDs of the blocks to move.

  • Type: Array
  • Required: Yes

hideDragHandle

If this property is true, the drag handle is hidden.

  • Type: boolean
  • Required: No
  • Default: false

Related components

Block Editor components are components that can be used to compose the UI of your block editor. Thus, they can only be used under a BlockEditorProvider in the components tree.