Skip to main content
PROYECTOVIVIANA

ActionMenu

The props declared for ActionMenu, generated from the types @proyecto-viviana/ui ships.

Import

import { ActionMenu } from "@proyecto-viviana/ui";

Props

Props for ActionMenu in @proyecto-viviana/ui
PropTypeDefaultDescription
itemsCollectionEntry<T>[]—Item objects in the collection.
childrennumber | boolean | RenderedElement | ArrayElement | (string & {}) | Node | JSX.ArrayElement | ((item: T) => JSX.Element)—The contents of the collection.
classstring—Additional CSS class name for the menu. Legacy alias.
labelstring—Accessible label for the trigger button. Legacy alias.
isQuietfalse | true—Whether the button should be displayed with a quiet style.
isDisabledfalse | true—Whether the trigger is disabled.
size'S' | 'M' | 'L' | 'XL' | 'XS''M'The size of the ActionButton.
menuSize'S' | 'M' | 'L' | 'XL''M'The size of the Menu.
hideLinkOutIconfalse | true—Hides the default link out icons on menu items that open links in a new tab.
align'start' | 'end''start'Alignment of the menu relative to the trigger.
direction'start' | 'end' | 'top' | 'bottom' | 'left' | 'right''bottom'Where the Menu opens relative to its trigger.
shouldFlipfalse | true—Whether the menu should automatically flip direction when space is limited.
defaultOpenfalse | true—Whether the overlay is open by default.
isOpenfalse | true—Whether the overlay is open, controlled.
onOpenChange(isOpen: boolean) => void—Handler called when the overlay open state changes.
autoFocusfalse | true—Whether the trigger should receive focus on render.
stylesStyleString | (() => StyleString | undefined)—Spectrum-defined generated classes for the trigger button.
UNSAFE_classNamestring—Additional CSS class name for the trigger button. Use only as a last resort.
UNSAFE_styleJSX.CSSProperties—Additional inline styles for the trigger button. Use only as a last resort.
idstring—Identifies the trigger element.
aria-labelstring—Accessible label for the trigger button.
aria-labelledbystring—Identifies the element that labels the trigger button.
aria-describedbystring—Identifies the element that describes the trigger button.
aria-detailsstring—Identifies the element that provides details for the trigger button.
slotstring—Not yet documented
refHTMLButtonElement | ((el: HTMLButtonElement) => void) | { current?: HTMLButtonElement | null | undefined; }—Not yet documented
onBlur(e: FocusEvent) => void—Handler called when focus moves out of the menu. solidaria
onClose() => void—Handler called when the menu should close. solidaria-components
onFocus(e: FocusEvent) => void—Handler called when focus moves into the menu. solidaria
onSelectionChange(keys: "all" | Set<Key>) => void—Handler for selection changes. solid-stately
render(props: JSX.HTMLAttributes<HTMLDivElement>, renderProps: MenuRenderProps) => JSX.Element—Custom renderer for the menu element. solidaria-components
onFocusChange(isFocused: boolean) => void—Handler called when the focus state changes. solidaria
selectionMode'none' | 'single' | 'multiple'—The selection mode. solid-stately
disallowEmptySelectionfalse | true—Whether empty selection is disallowed. solid-stately
selectedKeys"all" | Iterable<Key>—Currently selected keys (controlled). solid-stately
defaultSelectedKeys"all" | Iterable<Key>—Default selected keys (uncontrolled). solid-stately
onAction(key: Key, value: T) => void—Handler called when an item is activated, with the activated item's value. solidaria-components
shouldCloseOnSelectfalse | true—Whether the menu should close when an item is selected. solidaria-components
shouldFocusWrapfalse | true—Whether focus should automatically wrap around. solidaria
disallowTypeAheadfalse | truefalseWhether type-to-select is disabled. solidaria
selectionBehavior'toggle' | 'replace'—How selection behaves on interaction. solid-stately
allowDuplicateSelectionEventsfalse | true—Whether to allow duplicate selection events. solid-stately
getKey(item: T) => Key—Function to get the key from an item. solidaria-components
getTextValue(item: T) => string—Function to get the text value from an item. solidaria-components
getDisabled(item: T) => boolean—Function to check if an item is disabled. solidaria-components
disabledKeysIterable<Key>—Keys of disabled items. solidaria-components
disabledBehavior'all' | 'selection'—Whether disabled items can still receive focus. solidaria-components
staticChildren() => JSX.Element | undefined—Internal lazy static children accessor used when collection children need menu context. solidaria-components
renderEmptyState() => JSX.Element—Content to display when the menu has no items. solidaria-components
dragAndDropHooksDragAndDropHooks<T>—Drag and drop hooks from `useDragAndDrop`. solidaria-components

Declared in packages/viviana-ui/src/menu/ActionMenu.tsx.

Props marked solidaria or solidaria-components come from the headless layer underneath and behave the same in both registers. Components that wrap a DOM element also accept that element's standard attributes, which are left out here on purpose — listing them would bury the props that are actually ours.