File size: 2,192 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
import {
Box,
Button,
Checkbox,
ClientOnly,
HStack,
Heading,
Progress,
RadioGroup,
Skeleton,
VStack,
} from "@chakra-ui/react"
import Image from "next/image"
import { ColorModeToggle } from "../components/color-mode-toggle"
export default function Page() {
return (
<Box textAlign="center" fontSize="xl" pt="30vh">
<VStack gap="8">
<Image
alt="chakra logo"
src="/static/logo.svg"
width="80"
height="80"
/>
<Heading size="2xl" letterSpacing="tight">
Welcome to Chakra UI v3 + Next.js (App)
</Heading>
<HStack gap="10">
<Checkbox.Root defaultChecked>
<Checkbox.HiddenInput />
<Checkbox.Control>
<Checkbox.Indicator />
</Checkbox.Control>
<Checkbox.Label>Checkbox</Checkbox.Label>
</Checkbox.Root>
<RadioGroup.Root display="inline-flex" defaultValue="1">
<RadioGroup.Item value="1" mr="2">
<RadioGroup.ItemHiddenInput />
<RadioGroup.ItemControl>
<RadioGroup.ItemIndicator />
</RadioGroup.ItemControl>
<RadioGroup.ItemText lineHeight="1">Radio</RadioGroup.ItemText>
</RadioGroup.Item>
<RadioGroup.Item value="2">
<RadioGroup.ItemHiddenInput />
<RadioGroup.ItemControl>
<RadioGroup.ItemIndicator />
</RadioGroup.ItemControl>
<RadioGroup.ItemText lineHeight="1">Radio</RadioGroup.ItemText>
</RadioGroup.Item>
</RadioGroup.Root>
</HStack>
<Progress.Root width="300px" value={65} striped>
<Progress.Track>
<Progress.Range />
</Progress.Track>
</Progress.Root>
<HStack>
<Button>Let's go!</Button>
<Button variant="outline">bun install @chakra-ui/react</Button>
</HStack>
</VStack>
<Box pos="absolute" top="4" right="4">
<ClientOnly fallback={<Skeleton w="10" h="10" rounded="md" />}>
<ColorModeToggle />
</ClientOnly>
</Box>
</Box>
)
}
|