ActionMenu
The props declared for ActionMenu, generated from the types @proyecto-viviana/ui ships.
Import
import { ActionMenu } from "@proyecto-viviana/ui";Props
| Prop | Type | Default | Description |
|---|---|---|---|
items | CollectionEntry<T>[] | — | Item objects in the collection. |
children | number | boolean | RenderedElement | ArrayElement | (string & {}) | Node | JSX.ArrayElement | ((item: T) => JSX.Element) | — | The contents of the collection. |
class | string | — | Additional CSS class name for the menu. Legacy alias. |
label | string | — | Accessible label for the trigger button. Legacy alias. |
isQuiet | false | true | — | Whether the button should be displayed with a quiet style. |
isDisabled | false | 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. |
hideLinkOutIcon | false | 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. |
shouldFlip | false | true | — | Whether the menu should automatically flip direction when space is limited. |
defaultOpen | false | true | — | Whether the overlay is open by default. |
isOpen | false | true | — | Whether the overlay is open, controlled. |
onOpenChange | (isOpen: boolean) => void | — | Handler called when the overlay open state changes. |
autoFocus | false | true | — | Whether the trigger should receive focus on render. |
styles | StyleString | (() => StyleString | undefined) | — | Spectrum-defined generated classes for the trigger button. |
UNSAFE_className | string | — | Additional CSS class name for the trigger button. Use only as a last resort. |
UNSAFE_style | JSX.CSSProperties | — | Additional inline styles for the trigger button. Use only as a last resort. |
id | string | — | Identifies the trigger element. |
aria-label | string | — | Accessible label for the trigger button. |
aria-labelledby | string | — | Identifies the element that labels the trigger button. |
aria-describedby | string | — | Identifies the element that describes the trigger button. |
aria-details | string | — | Identifies the element that provides details for the trigger button. |
slot | string | — | Not yet documented |
ref | HTMLButtonElement | ((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 |
disallowEmptySelection | false | 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 |
shouldCloseOnSelect | false | true | — | Whether the menu should close when an item is selected. solidaria-components |
shouldFocusWrap | false | true | — | Whether focus should automatically wrap around. solidaria |
disallowTypeAhead | false | true | false | Whether type-to-select is disabled. solidaria |
selectionBehavior | 'toggle' | 'replace' | — | How selection behaves on interaction. solid-stately |
allowDuplicateSelectionEvents | false | 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 |
disabledKeys | Iterable<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 |
dragAndDropHooks | DragAndDropHooks<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.