Zoom Slider
A zoom control that lets you zoom in and out seamlessly using a slider.
Last updated on
Make sure to follow the prerequisites before installing the component.
npx shadcn@latest add https://ui.reactflow.dev/zoom-sliderpnpm dlx shadcn@latest add https://ui.reactflow.dev/zoom-sliderimport { Background, Panel, ReactFlow } from "@xyflow/react";
import { ZoomSlider } from "@/registry/components/zoom-slider/";
import { Button } from "@/components/ui/button";
import { useState } from "react";
const defaultNodes = [
{
id: "1",
position: { x: