The Modal component consists of a container, a header, a body, and a footer. The header contains the title of the modal, the body contains the main content, and the footer contains any buttons or actions.

TypeResource
DesignFigma
WebWeb Storybook
CodeGitlab

Usage

import { Modal } from 'bio-bind-ui';
<Modal
  id='modal'
  labelCancel='Cancel'
  labelConfirm='Confirm'
  mode='light'
  showOverlay
  size='lg'
  title='Modal Title'
/>

Examples

Size

Change size of the modal: xs, sm, md, lg, xl


With No Title

Modal with no title to show


Mode (Optional)

Change mode light or dark

Props

PropsRequiredDefaultTypedescription
idtrue-stringId of the modal
modefalselightlight darkLight & dark mode of the modal
sizefalselgxs sm md lg xlSize of the modal
showOverlayfalsetruebooleanShow or hide the overlay
titletrue-stringTitle of the modal
labelCancelfalsecancelstringLabel of the cancel button
labelConfirmfalseconfirmstringLabel of the confirm button
openfalsefalsestringShow or hide the modal
titleIconfalse-stringTitle icon of the modal
closeIconfalse-stringTitle icon of the modal
onClickClosetrue-functionClick on the close button
onClickCanceltrue-functionClick on the cancel button
onClickConfirmtrue-functionClick on the confirm button
headerfalse-stringHeader of the modal
bodyfalse-stringBody of the modal
footerfalse-stringFooter of the modal
stylefalse-CSSPropertiesCustom styles for the modal component.
BIND © Biofarma Innovate Next-level Design .