UNPKG

@carbon/react

Version:

React components for the Carbon Design System

48 lines (47 loc) 1.69 kB
/** * Copyright IBM Corp. 2020, 2025 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ import React, { type ElementType } from 'react'; interface OverflowMenuProps { /** * **Experimental**: Will attempt to automatically align the floating element to avoid collisions with the viewport and being clipped by ancestor elements. */ autoAlign?: boolean; /** * A collection of MenuItems to be rendered within this OverflowMenu. */ children?: React.ReactNode; /** * Additional CSS class names for the trigger button. */ className?: string; /** * A label describing the options available. Is used in the trigger tooltip and as the menu's accessible label. */ label?: string; /** * Experimental property. Specify how the menu should align with the button element */ menuAlignment?: 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end'; /** * A component used to render an icon. */ renderIcon?: ElementType; /** * Specify the size of the menu, from a list of available sizes. */ size?: 'sm' | 'md' | 'lg'; /** * Specify how the trigger tooltip should be aligned. */ tooltipAlignment?: 'top' | 'top-left' | 'top-right' | 'bottom' | 'bottom-left' | 'bottom-right' | 'left' | 'right'; /** * Specify a DOM node where the Menu should be rendered in. Defaults to document.body. */ menuTarget?: Element; } declare const OverflowMenu: React.ForwardRefExoticComponent<OverflowMenuProps & React.RefAttributes<HTMLDivElement>>; export { OverflowMenu };