Drawer

A drawer is a component that slides in from the side of the screen. It is typically used to display additional content, such as a detail view or a list of options.

TypeResource
DesignFigma
WebWeb Storybook
CodeGitlab

Usage

import { Drawer } from 'bio-bind-ui';
<Drawer
  id='drawer'
  mode='light'
  onClickBack={() => {}}
  size='md'
  subtitle='Subtitle'
  title='Drawer Title'
/>

Examples

Size

Use size for change the width size of drawer component: sm, md, lg, xl, full


Placement

Use placement for change position of drawer: left or right


Mode (Optional)

Use mode for change the color mode of drawer component: light or dark


Props

PropsRequiredDefaultTypeDescription
idfalse-stringThe unique identifier for the Drawer component. Useful for targeting specific elements.
titlefalse-stringThe title of the Drawer.
subtitlefalse-stringThe subtitle of the Drawer.
childrenfalse-React.ReactNodeThe content inside the Drawer.
isOpenfalsefalsebooleanIndicates whether the Drawer is open or closed.
onClosefalse-() => voidA function called when the Drawer is closed.
placementfalselefttop, right, bottom, leftThe placement of the Drawer, determining which side of the screen it will appear on.
modefalselightlight, darkThe mode of the Drawer, either light or dark theme.
sizefalsemdxs, sm, md, lg, xl, fullThe size of the Drawer, ranging from extra small to full width.
classNamefalse-stringThe class name of the Drawer component for styling.
footerActionsfalse-React.ReactNodeThe footer actions inside the Drawer, typically buttons or links.
customHeaderfalse-React.ReactNodeA custom header for the Drawer, allowing custom elements or content.
isShowBackButtonfalsefalsebooleanIndicates whether a back button should be shown in the Drawer.
onClickBackfalse-() => voidA function called when the back button is clicked in the Drawer.
BIND © Biofarma Innovate Next-level Design .