useModalForm hook allows you to manage a form within a modal as well as a drawer. It provides some useful methods to handle the form modal or form drawer. You can view the live example or review the source code to see how it's used with Material UI.
RUN IN YOUR LOCAL
npm create refine-app@latest -- --example form-chakra-ui-use-drawer-form