Slider
How to use the Slider component from the Horizon kit.
import { Canvas } from "@react-three/fiber"; import { Fullscreen } from "@react-three/uikit"; import { Panel } from "@react-three/uikit-horizon"; import { Slider } from '@react-three/uikit-horizon' function SliderDemo() { return <Slider defaultValue={50} min={0} max={100} step={1} width={300} /> } export default function App() { return ( <Canvas style={{ position: "absolute", inset: "0", touchAction: "none" }} gl={{ localClippingEnabled: true }}> <ambientLight intensity={0.5} /> <directionalLight intensity={1} position={[-5, 5, 10]} /> <Fullscreen overflow="scroll" flexDirection="column" alignItems="center" justifyContent="center" > <Panel color="black" dark={{ color: "white" }} padding={32}> <SliderDemo /> </Panel> </Fullscreen> </Canvas> ) }
import { Slider } from "@react-three/uikit-horizon";