---
title: Slate React
description: API reference for @udecode/slate-react.
---

`@udecode/slate-react` extends Slate React API with generic types.

## React Editor

Find the corresponding documentation in the [Slate React docs](https://docs.slatejs.org/libraries/slate-react/react-editor).

### `SlateProps`

### `blurEditor`

### `deselectEditor`

### `findEditorDocumentOrShadowRoot`

### `findEventRange`

### `findNodeKey`

### `findNodePath`

### `focusEditor`

### `getEditorWindow`

### `hasEditorDOMNode`

### `hasEditorEditableTarget`

### `hasEditorSelectableTarget`

### `hasEditorTarget`

### `insertData`

### `isComposing`

### `isEditorFocused`

### `isEditorReadOnly`

### `isTargetInsideNonReadonlyVoidEditor`

### `setFragmentData`

### `toDOMNode`

### `toDOMPoint`

### `toDOMRange`

### `toSlateNode`

### `toSlatePoint`

### `toSlateRange`

## Transforms

### focusEditorEdge

Focuses the editor at a specified edge (start or end).

<APIParameters>
  <APIItem name="editor" type="TEditor">
    The editor instance.
  </APIItem>
  <APIItem name="options" type="object" optional>
    <APISubList>
      <APISubListItem parent="options" name="edge" type="'start' | 'end'" optional>
        The edge to focus on. 
        - 'start': Focus at the beginning of the editor.
        - 'end': Focus at the end of the editor.
        Default is 'start'.
      </APISubListItem>
    </APISubList>
  </APIItem>
</APIParameters>

### setNode

Sets properties on a specific node in the editor.

<APIParameters>
  <APIItem name="editor" type="TEditor">
    The editor instance.
  </APIItem>
  <APIItem name="node" type="NodeOf<E>">
    The node to update.
  </APIItem>
  <APIItem name="props" type="Partial<TNodeProps<N>>">
    The properties to set on the node.
  </APIItem>
  <APIItem name="options" type="Omit<SetNodesOptions<E>, 'at'>" optional>
    Options for setting nodes, excluding the 'at' property.
  </APIItem>
</APIParameters>