Slider

How to use the Slider component from the Apfel kit.

import { Canvas } from "@react-three/fiber";
import { Fullscreen } from "@react-three/uikit";
import { Defaults } from "@react-three/uikit-apfel";
import { Container } from '@react-three/uikit'
import { BoxSelect } from '@react-three/uikit-lucide'
import { Card } from "@react-three/uikit-apfel"
import { Slider } from "@react-three/uikit-apfel"

function SlidersOnCard() {
return (
  <Card
    borderRadius={32}
    padding={16}
    flexDirection="column"
    md={{ flexDirection: 'row' }}
    gapColumn={16}
    gapRow={32}
  >
    <Container flexDirection="column" gapRow={16} width={250}>
      <Slider size="xs" defaultValue={25} />
      <Slider size="sm" defaultValue={50} />
      <Slider size="md" defaultValue={75} icon={<BoxSelect />} />
      <Slider size="lg" defaultValue={100} icon={<BoxSelect />} />
    </Container>
  </Card>
)
}

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]} />
    <Defaults>
      <Fullscreen
        overflow="scroll"
        scrollbarColor="black"
        backgroundColor="white"
        dark={{ backgroundColor: "black" }}
        flexDirection="column"
        gap={32}
        paddingX={32}
        alignItems="center"
        padding={32}
      >
        <SlidersOnCard />
      </Fullscreen>
    </Defaults>
  </Canvas>
)
}
npx uikit component add apfel slider