`.
For example, to change the border color of a node, based on an hypothetical execution status,
you can pass extra `className`s:
```tsx
// Assuming your component is receiving a `data` prop
export const BaseNodeSimpleDemo = memo(({ data }: NodeProps) => {
return (
{/* Your custom node definiton goes here */}
);
});
```
import UiComponentViewer from '@/components/ui-component-viewer.mdx';
### Button Edge
An edge with a button that can be used to trigger a custom action.
import UiComponentViewer from '@/components/ui-component-viewer.mdx';
### Button Handle
A handle component with a button attached.
import UiComponentViewer from '@/components/ui-component-viewer.mdx';
### Data Edge
An edge that displays one field from the source node's `data` object.
#### Additional type safety
When creating new edges of this type, you can use TypeScript's `satisfies` predicate
along with the specific type of a node in your application to ensure the `key`
property of the edge's data is a valid key of the node's data.
```ts
type CounterNode = Node<{ count: number }>;
const initialEdges = [
{
id: 'edge-1',
source: 'node-1',
target: 'node-2',
type: 'dataEdge',
data: {
key: 'count',
} satisfies DataEdge
,
},
];
```
If you try to use a key that is not present in the node's data, TypeScript will
show an error message like:
> ts: Type '"value"' is not assignable to type '"count"'.
import UiComponentViewer from '@/components/ui-component-viewer.mdx';
### Database Schema Node
A node that can be used to visualize a database schema.
### DevTools
import UiComponentViewer from '@/components/ui-component-viewer.mdx';
### DevTools
A debugging tool that provides data on the viewport, the state of each node, and logs change events. This component
is based on [DevTools and Debugging](/learn/advanced-use/devtools-and-debugging) under Advanced Use.
You can import the entire `` component, or optionally, import individual components for greater flexibility. These components include:
* A `` component that shows the current position and zoom level of the viewport.
* A `` component that reveals the state of each node.
* A `` that wraps your flow’s onNodesChange handler and logs each change as it is dispatched.
You can read more about the individual components at [DevTools and Debugging](/learn/advanced-use/devtools-and-debugging). While we find these tools useful for making sure React Flow is working properly, you might also find them useful for debugging your applications as your flows and their interactions become more complex.
import UiComponentViewer from '@/components/ui-component-viewer.mdx';
### Labeled Group Node
A group node with an optional label.
import UiComponentViewer from '@/components/ui-component-viewer.mdx';
### Labeled Handle
A handle with a label that can be used to display additional information.
import UiComponentViewer from '@/components/ui-component-viewer.mdx';
### Node Appendix
A wrapper component for dynamically appending information to nodes in an absolutely positioned container.
import UiComponentViewer from '@/components/ui-component-viewer.mdx';
### Node Status Indicator
A node wrapper that has multiple states for indicating the status of a node. Status can be one of the following: `"success"`, `"loading"`, `"error"` and `"initial"`.
Additionally, the `NodeStatusIndicator` component supports different loading variants: `"border"` and `"overlay"`, which can be set using the `loadingVariant` prop.
* The `"border"` variant is the default and shows a spinning border around the node when it is in loading state.
* The `"overlay"` variant shows a full overlay, with an animated spinner on the node when it is in loading state.
import UiComponentViewer from '@/components/ui-component-viewer.mdx';
### Node Tooltip
A wrapper for node components that displays a tooltip when hovered.
Built on top of the [NodeToolbar](/api-reference/components/node-toolbar) component that comes with React Flow.
import UiComponentViewer from '@/components/ui-component-viewer.mdx';
### Placeholder Node
A custom node that can be clicked to create a new node.
import UiComponentViewer from '@/components/ui-component-viewer.mdx';
### Zoom Select
A zoom control that lets you zoom in and out seamlessly using a select dropdown.
import UiComponentViewer from '@/components/ui-component-viewer.mdx';
### Zoom Slider
A zoom control that lets you zoom in and out seamlessly using a slider.
### Workflow Editor
import ProExampleViewer from '@/components/pro-example-viewer';
### Workflow Editor
The Workflow Editor template is a Next.js-based application designed to help you quickly
create, manage, and visualize workflows. Built with [React Flow UI](/ui) and styled using
[Tailwind CSS](https://tailwindcss.com/) and [shadcn/ui](https://ui.shadcn.com/), this
project provides a highly customizable foundation for building and extending workflow
editors.
#### Tech Stack
* **React Flow UI**: The project uses [React Flow UI](/ui) to build nodes. These
components are designed to help you quickly get up to speed on projects.
* **shadcn CLI**: The project uses the [shadcn CLI](https://ui.shadcn.com/docs/cli) to
manage UI components. This tool builds on top of
[Tailwind CSS](https://tailwindcss.com/) and [shadcn/ui](https://ui.shadcn.com/)
components, making it easy to add and customize UI elements.
* **State Management with Zustand**: The application uses Zustand for state management,
providing a simple and efficient way to manage the state of nodes, edges, and other
workflow-related data.
#### Features
* **Automatic Layouting**: Utilizes the [ELKjs](https://github.com/kieler/elkjs) layout
engine to automatically arrange nodes and edges.
* **Drag-and-Drop Sidebar**: Add and arrange nodes using a drag-and-drop mechanism.
* **Customizable Components**: Uses React Flow UI and the shadcn library to create
highly-customizable nodes and edges.
* **Dark Mode**: Toggles between light and dark themes, managed through the Zustand store.
* **Runner Functionality**: Executes and monitors nodes sequentially with a workflow
runner.