ContextMenuButton

January 30, 2026 ยท View on GitHub

ContextMenuButton is used for displaying context menu actions on a list's item

Usage

import { ContextMenuButton } from "@docspace/ui-kit/components/context-menu-button";
import VerticalDotsReactSvgUrl from "@docspace/ui-kit/assets/icons/16/vertical-dots.react.svg?url";
<ContextMenuButton
  iconName={VerticalDotsReactSvgUrl}
  size={16}
  color="#A3A9AE"
  isDisabled={false}
  title="Actions"
  getData={() => [
    {
      key: "key",
      label: "label",
      onClick: () => alert("label"),
    },
  ]}
/>

Properties

PropsTypeRequiredValuesDefaultDescription
classNamestring---Accepts class
clickColorstring---Specifies the icon click color
colorstring---Specifies the icon color
dataarray--[ ]Array of options for display
directionXoneOf-left,rightleftWhat the button will trigger when mouse out of button
getDatafuncโœ…--Function for converting to inner data
hoverColorstring---Specifies the icon hover color
iconClickNamestring---Specifies the icon click name
iconHoverNamestring---Specifies the icon hover name
iconNamestring--VerticalDotsIconSpecifies the icon name
idstring---Accepts id
isDisabledbool--falseTells when the button should present a disabled state
onMouseEnterfunc---What the button will trigger when mouse hovered
onMouseLeavefunc---What the button will trigger when mouse leave
onMouseOutfunc---What the button will trigger when mouse out of button
onMouseOverfunc---What the button will trigger when mouse over button
openedbool--falseTells when the button should present a opened state
sizenumber--16Specifies the icon size
styleobj, array---Accepts css style
titlestring---Specifies the icon title