A React component that is a base button.
npm install @chakra-ui/buttonButtons are used as triggers for actions. They are used in forms, toolbars,
dialog footers and as stand-alone action triggers.
``sh
yarn add @chakra-ui/button
npm i @chakra-ui/button
`
`jsx`
import { Button } from "@chakra-ui/button"
`jsx`
Use the size prop to change the size of the button. You can set the value toxs, sm, md, or lg.
`jsx`
Use the variant prop to change the visual style of the Button. You can set thesolid
value to , ghost, outline, or link.
`jsx`
You can add left and right icons to the Button components.
`jsx`
} variant="solid">
Email
} variant="outline">
Call us
Pass isLoading prop to the Button component to show its loading state. You canloadingText
optionally pass prop.
You can also use a custom spinner to render your own spinner component.
`jsx
isLoading
colorScheme="teal"
variant="outline"
spinner={
>
Submit
``