[ Web Proxy ]
URL:
Viewing: https://reactflow.dev/api-reference/utils/is-node [Back]  [Original]

isNode() - React FlowSkip to Content

React Flow

LearnReferenceExamplesUIShowcaseMoreReact Flow ProRemove Attribution
SearchGitHubDiscord

On This Page

ReferenceUtils

isNode()

Source on GitHub

Test whether an object is usable as a Node. In TypeScript this is a type guard that will narrow the type of whatever you pass in to Node if it returns true.

import { isNode } from '@xyflow/react'; const node = { id: 'node-a', data: { label: 'node', }, position: { x: 0, y: 0, }, }; if (isNode(node)) { // .. }

Signature

Parameters:
NameTypeDefault
elementunknown

The element to test.

Returns:
boolean
Last updated on August 17, 2026

A project by the xyflow team

We are building and maintaining open source software for node-based UIs since 2019.

Web Proxy Viewer  |  New URL  |  Original Page