1)install react using viteintsall npm create vite@latest my-app --template react
2)downgrade react to version 18 npm install react@18 react-dom@18
3)intall chakra version 2.0 npm i @chakra-ui/react@2 @emotion/react @emotion/styled framer-motion
4)use provider to get chakra ui(check the synax in the chakra website)
import { ChakraProvider } from '@chakra-ui/react'
function App() {
// 2. Wrap ChakraProvider at the root of your app
return (
<ChakraProvider>
<TheRestOfYourApplication />
</ChakraProvider>
)