This component no longer exists. It was in diceui/base’s manifest when we first indexed it and is not there now — the registry served its inventory on 2026-08-13 and this item was not on it. The install command below will fail. It is kept here because a tutorial somewhere still tells people to run it.
compare-slider-controlled-demo
diceui-base/compare-slider-controlled-demoRemovedExample
diceui/base publishes no description for this item.
Install it
npx shadcn@latest add https://raw.githubusercontent.com/sadmann7/diceui/HEAD/docs/public/r/styles/base-vega/compare-slider-controlled-demo.jsonSource
1"use client";23import * as React from "react";4import {5 CompareSlider,6 CompareSliderAfter,7 CompareSliderBefore,8 CompareSliderHandle,9} from "@/registry/bases/base/ui/compare-slider";1011export default function CompareSliderControlledDemo() {12 const [value, setValue] = React.useState(30);1314 return (15 <CompareSlider16 value={value}17 onValueChange={setValue}18 className="h-[400px] overflow-hidden rounded-lg border"19 >20 <CompareSliderBefore label="Original">21 {/* biome-ignore lint/performance/noImgElement: Demo image for comparison slider */}22 <img23 src="https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=1920&h=1080&fit=crop&auto=format&fm=webp&q=80"24 alt="Original"25 className="size-full object-cover"26 />27 </CompareSliderBefore>28 <CompareSliderAfter label="Enhanced">29 {/* biome-ignore lint/performance/noImgElement: Demo image for comparison slider */}30 <img31 src="https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=1920&h=1080&fit=crop&auto=format&fm=webp&q=80&sat=50"32 alt="Enhanced"33 className="size-full object-cover"34 />35 </CompareSliderAfter>36 <CompareSliderHandle />37 </CompareSlider>38 );39}
What it pulls in
npm packages
Other registry items
