Home > Enterprise >  Chakra ui Button not rendering
Chakra ui Button not rendering

Time:06-17

I am trying to change color and size of Button from the Chakra UI. I am unable to figure out why nothing is changing.

import './App.css';
import { Textarea, Stack, Button } from '@chakra-ui/react';
function App() {


  return (
    <>
    <div className="App">
      <h1>Notes App</h1>
      <Textarea
        placeholder="Enter your note"
        size='sm'
        width='50%' />
    </div>
    <div>
      <Button colorScheme='blue'>Button</Button>
    </div>
    </>
  );
}

export default App;

CodePudding user response:

you have to wrap your App component with ChakraProvider to "inject" chakra's CSS. You have that step in the documentation on this link https://chakra-ui.com/guides/getting-started/cra-guide#2-provider-setup Also, take a look at previous steps if you had setup everything in the same way as it is in the documentation.

  • Related