react-flow-scrollbar

Installation

Install react-flow-scrollbar and import its stylesheet alongside React Flow's.

Install the package

npm install react-flow-scrollbar
pnpm add react-flow-scrollbar
yarn add react-flow-scrollbar

Peer dependencies: @xyflow/react >=12 and react ^18 || ^19. They are not bundled — you already have them in a React Flow app.

Import the styles

The scrollbars are styled with plain CSS variables, so you import one stylesheet — after React Flow's own stylesheet:

import '@xyflow/react/dist/style.css';
import 'react-flow-scrollbar/styles.css';

That's all the setup. Head to the Quick Start for a working, interactive example with its full source.

On this page