API Reference
Rockets React API
react-material-ui
type-aliases
DrawerProps

Type Alias: DrawerProps

DrawerProps: object

Drawer component props.

Type declaration

NameTypeDescription
activeIconColorDrawerItemProps["activeIconColor"]Color of the active drawer item icons
backgroundColorStyledDrawerProps["backgroundColor"]Background color of the drawer
buttonSxSxProps<Theme>Custom styles for drawer buttons, following the sx (opens in a new tab) pattern.
collapsedbooleanWhether the drawer is collapsed
collapsedWidthStyledDrawerProps["collapsedWidth"]Width of the drawer when collapsed
collapsiblebooleanWhether the drawer is collapsible
collapsibleIconReactNode | (collapsed?) => ReactNodeIcon to use for the collapsible button
collapsibleIconBgColorstringBackground color of the collapsible icon
collapsibleIconColorstringColor of the collapsible icon
currentIdstringID of the currently active item, changing the menu item to active when the page selected corresponds to the path name.
customToggle(toggleDrawer, collapsed?) => ReactNodeCustom node that can be rendered on the bottom of the Drawer, serving as toggle for expanded/collapsed state.
expandedWidthStyledDrawerProps["expandedWidth"]Width of the drawer when expanded
horizontalbooleanWhether the drawer items should be displayed horizontally
iconColorDrawerItemProps["iconColor"]Color of the drawer item icons
itemsDrawerItemProps[]Array of items to display in the drawer
logostring | ReactNode | (collapsed?) => ReactNodeLogo to display in the drawer header
mobileIsOpenbooleanWhether the drawer is open on mobile devices
onCollapsedChange(collapsed) => voidCallback function to handle changes to the collapsed state
onMobileClose() => voidCallback function to handle closing the drawer on mobile devices
sxStyledDrawerProps["sx"]Custom styles for the drawer, following the sx (opens in a new tab)
textPropsTextPropsProps for text elements inside the drawer

Defined in

packages/react-material-ui/src/components/Drawer/Drawer.tsx:17 (opens in a new tab)