Alert

How to use the Alert component from the Default kit.

import { Canvas } from "@react-three/fiber";
import { Fullscreen } from "@react-three/uikit";
import { colors } from "@react-three/uikit-default";
import { Text } from '@react-three/uikit'
import { Terminal } from '@react-three/uikit-lucide'
import { Alert, AlertDescription, AlertIcon, AlertTitle } from '@react-three/uikit-default'

function AlertDemo() {
return (
  <Alert maxWidth={500}>
    <AlertIcon>
      <Terminal width={16} height={16} />
    </AlertIcon>
    <AlertTitle>
      <Text>Error</Text>
    </AlertTitle>
    <AlertDescription>
      <Text>You can add components to your app using the cli.</Text>
    </AlertDescription>
  </Alert>
)
}

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}
      backgroundColor={colors.background}
    >
      <AlertDemo />
    </Fullscreen>
  </Canvas>
)
}
import { Alert } from "@react-three/uikit-default";