Chakra Ui provides disclosure
const { isOpen, onOpen, onClose } = useDisclosure();
and in the documentation this button will close the drawer
<Button variant="outline" mr={3} onClick={onClose}>
Cancel
</Button>
they haven't provided something like close() function to close it programmatically, or am i missing something