Panel

How to use the Panel component from the Horizon kit.

import { Canvas } from "@react-three/fiber";
import { Fullscreen } from "@react-three/uikit";
import { Container, Text } from '@react-three/uikit'
import { Panel } from '@react-three/uikit-horizon'

function PanelDemo() {
return (
  <Panel padding={16} width={300}>
    <Container>
      <Text>Panel content</Text>
    </Container>
  </Panel>
)
}



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"
      padding={32}
    >
      <PanelDemo />
    </Fullscreen>
  </Canvas>
)
}
import { Panel } from "@react-three/uikit-horizon";