List
How to use the List 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 { Text, Container } from '@react-three/uikit' import { BoxSelect, ChevronRight, Info } from '@react-three/uikit-lucide' import { Card } from "@react-three/uikit-apfel" import { List, ListItem } from "@react-three/uikit-apfel" import { Button } from "@react-three/uikit-apfel" function ListsOnCard() { return ( <Container flexDirection="column" gapRow={32} alignItems="center"> <Container flexDirection="column" md={{ flexDirection: 'row' }} gap={32}> <Card flexDirection="column" borderRadius={32} padding={16}> <List type="plain" width={400}> <ListItem subtitle={<Text>Subtitle</Text>} trailingAccessory={<ChevronRight height={18} width={18} opacity={0.3} />} > <Text>Title</Text> </ListItem> <ListItem trailingAccessory={<ChevronRight height={18} width={18} opacity={0.3} />}> <Text>Title</Text> </ListItem> <ListItem subtitle={<Text>Subtitle</Text>} selected trailingAccessory={<ChevronRight height={18} width={18} opacity={0.3} />} > <Text>Title</Text> </ListItem> </List> </Card> </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} > <ListsOnCard /> </Fullscreen> </Defaults> </Canvas> ) }
npx uikit component add apfel list