
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
chakra-multi-modal
Advanced tools
A Chakra UI Multi Modal - one modal with multiple, switchable sections
This component is a wrapper for a basic Chakra's Modal component. It provides its own Context along with Section and (optional) Footer components for switching content inside one opened Modal.
This version (1.x) of MultiModal was created for Chakra UI v2. MultiModal wasn't tested for previous Chakra's versions.
In order to use this package, you'll need to have @chakra-ui/react@2 set up like in their docs
Then install this package:
npm i chakra-multi-modal
# or
yarn add chakra-multi-modal
# or
pnpm add chakra-multi-modal
Once installed, you can replace Modal with MultiModal and add your sections to it:
const modalProps = useDisclosure();
return (
<MultiModal sections={[<FirstSection />, <SecondSection />]} {...modalProps}>
<ModalOverlay />
<ModalContent>
<ModalHeader>Title</ModalHeader>
<ModalCloseButton />
<MultiModalSection />
<MultiModalFooter />
</ModalContent>
</MultiModal>
);
MultiModalReplaces with Modal component
| Extra Prop | Type | Description |
|---|---|---|
sections | ReactElement[] | Takes all sections that should be displayed in the multi modal |
MultiModalSectionThis component is required and should be replaced with ModalBody component. Takes all ModalBody's props excluding children.
MultiModalFooterOptional component. Replaces ModalFooter and adds buttons for switching sections. Doesn't include children.
| Extra Prop | Type | Description |
|---|---|---|
nextButtonProps | ButtonProps | Props for 'Next/Close' button |
previousButtonProps | ButtonProps | Props for 'Previous' button |
If default MultiModalFooter doesn't meet your requirements you can remove it and build your own Footer or even add switching buttons to each section.
| Name | Type | Description |
|---|---|---|
currentSection | ReactElement | Returns current section |
isFirstSection | boolean | Indicates if the current section is the first section |
isLastSection | boolean | Indicates if the current section is the last section |
next | func | Switches to the next section |
previous | func | Switches to the previous section |
reset | func | Switches to the first section |
close | func | Closes modal |
Custom styles of MultiModalFooter's buttons
Custom buttons in section
Found a bug? Do you see something that can be done better? Feel free to open an issue or fork this repo and open a Pull Request. Please read Contribution Doc before contributing.
FAQs
A Chakra UI Multi Modal - one modal with multiple, switchable sections
The npm package chakra-multi-modal receives a total of 2 weekly downloads. As such, chakra-multi-modal popularity was classified as not popular.
We found that chakra-multi-modal demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.