Skeleton
How to use the Skeleton component from the Default kit.
import { Canvas } from "@react-three/fiber"; import { Fullscreen } from "@react-three/uikit"; import { Defaults, DialogAnchor } from "@react-three/uikit-default"; import { Container } from '@react-three/uikit' import { Skeleton } from "@react-three/uikit-default" function SkeletonDemo() { return ( <Container flexDirection="row" alignItems="center" gap={16}> <Skeleton borderRadius={1000} height={48} width={48} /> <Container flexDirection="column" gap={8}> <Skeleton height={16} width={250} /> <Skeleton height={16} width={200} /> </Container> </Container> ) } 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} > <DialogAnchor><SkeletonDemo /></DialogAnchor> </Fullscreen> </Defaults> </Canvas> ) }
npx uikit component add default skeleton