Skip to main content
PROYECTOVIVIANA

SelectBoxGroup

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

Import

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

Props

Props for SelectBoxGroup in @proyecto-viviana/ui
PropTypeDefaultDescription
children*JSX.Element | ((item: T) => JSX.Element)—The SelectBox elements contained within the SelectBoxGroup.
orientation'horizontal' | 'vertical''vertical'The layout direction of the content in each SelectBox.
isDisabledfalse | true—Whether the SelectBoxGroup is disabled.
stylesStyleString—Spectrum-defined generated classes.
UNSAFE_classNamestring—Additional CSS class name. Use only as a last resort.
UNSAFE_styleJSX.CSSProperties—Additional inline styles. Use only as a last resort.
classstring—Backward-compatible class alias. Prefer UNSAFE_className for S2 parity.
slotstring—Slot name when used in a Spectrum context.
refHTMLDivElement | ((el: HTMLDivElement) => void) | { current?: HTMLDivElement | null | undefined; }—Ref for the underlying listbox element.
idstring—An ID for the listbox. solidaria
onBlur(e: FocusEvent) => void—Handler called when focus moves out of the listbox. solidaria
onFocus(e: FocusEvent) => void—Handler called when focus moves into the listbox. solidaria
onSelectionChange(keys: "all" | Set<Key>) => void—Handler called when selection changes. solidaria-components
aria-describedbystring—The ID of an element that describes the listbox. solidaria
aria-labelstring—An accessible label for the listbox when no visible label is provided. solidaria
aria-labelledbystring—The ID of an element that labels the listbox. solidaria
onFocusChange(isFocused: boolean) => void—Handler called when the focus state changes. solidaria
selectionMode'none' | 'single' | 'multiple'—The selection mode. solidaria-components
disallowEmptySelectionfalse | true—Whether Escape and other collection-level interactions may clear the selection. This is an ARIA behavior override and does not change whether an option press may toggle the final selected item. solidaria
selectedKeys"all" | Iterable<Key>—Currently selected keys (controlled). solidaria-components
defaultSelectedKeys"all" | Iterable<Key>—Default selected keys (uncontrolled). solidaria-components
items*CollectionEntry<T>[]—The items to render in the listbox. solidaria-components
labelnumber | boolean | RenderedElement | ArrayElement | (string & {}) | Node | JSX.ArrayElement—The label for the listbox. solidaria
onAction(key: Key) => void—Handler called when an item is activated (pressed). solidaria
shouldFocusWrapfalse | true—Whether focus should automatically wrap around. solidaria
disallowTypeAheadfalse | truefalseWhether type-to-select is disabled. solidaria
selectionBehavior'toggle' | 'replace'—The selection behavior (toggle vs replace). solidaria-components
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
renderEmptyState() => JSX.Element—A function to render when the listbox is empty. solidaria-components
dragAndDropHooksDragAndDropHooks<T>—Drag and drop hooks from `useDragAndDrop`. solidaria-components
isVirtualizedfalse | true—Whether the listbox uses virtual scrolling. solidaria
isLoadingfalse | true—Whether additional items are currently loading. solidaria-components
keyboardDelegateKeyboardDelegate—An optional keyboard delegate implementation for type to select, to override the default. solidaria
layoutDelegateLayoutDelegate—A delegate object that provides layout information for items in the collection. By default this uses the DOM, but this can be overridden to implement things like virtualized scrolling. solidaria
shouldSelectOnPressUpfalse | true—Whether selection should occur on press up. solidaria
direction'ltr' | 'rtl'"ltr"The text direction, used to resolve the horizontal navigation axis. In a horizontal listbox, RTL flips Left/Right (Right=previous, Left=next). solidaria
hasMorefalse | true—Whether there are more items to load. solidaria-components
onLoadMore() => void | Promise<void>—Called when the load more sentinel becomes visible. solidaria-components
shouldFocusOnHoverfalse | true—Whether to focus items on hover. solidaria
shouldUseVirtualFocusfalse | true—Whether options should use virtual focus instead of receiving DOM focus. solidaria
slotsRecord<string, Partial<ListBoxProps<T>>>—Slot definitions provided through ListBoxContext. solidaria-components
linkBehavior'none' | 'selection' | 'action' | 'override'—The behavior of links in the collection. solidaria
UNSTABLE_itemBehavior'selection' | 'action'—Unstable upstream override that forces items with actions to prefer selection or action behavior. solidaria
shouldSelectOnFocusfalse | truetrueWhether keyboard focus movement should also update selection in single selection mode. solidaria
escapeKeyBehavior'none' | 'clearSelection'"clearSelection"Whether pressing the Escape key should clear selection in the listbox or not. Most experiences should not modify this option as it eliminates a keyboard user's ability to easily clear selection. Only use if the escape key is being handled externally or should not trigger selection clearing contextually. solidaria

Declared in packages/viviana-ui/src/selectboxgroup/index.tsx.

SelectBox props

Props for SelectBox in @proyecto-viviana/ui
PropTypeDefaultDescription
id*Key—The unique id of the SelectBox.
childrennumber | boolean | RenderedElement | ArrayElement | (string & {}) | Node | JSX.ArrayElement—The contents of the SelectBox.
stylesStyleString—Spectrum-defined generated classes.
UNSAFE_classNamestring—Additional CSS class name. Use only as a last resort.
UNSAFE_styleJSX.CSSProperties—Additional inline styles. Use only as a last resort.
classstring—Backward-compatible class alias. Prefer UNSAFE_className for S2 parity.
slotstring | false—A slot name for the component. HTML `slot` may be `false` to omit. solidaria-components
ref((el: HTMLDivElement) => void) | { current?: HTMLDivElement | null | undefined; }—Ref for the option element. solidaria-components
aria-labelstring—An accessible label for the option. solidaria
isDisabledfalse | true—Whether the option is disabled. solidaria
onHoverStart(e: HoverEvent) => void—Handler called when hover starts. solidaria
onHoverEnd(e: HoverEvent) => void—Handler called when hover ends. solidaria
onHoverChange(isHovering: boolean) => void—Handler called when hover state changes. solidaria
onAction() => void—Handler called when the option is activated. solidaria
isVirtualizedfalse | true—Whether the option is contained in a virtual scrolling listbox. solidaria
itemunknown—The item value. solidaria-components
textValuestring—The text value of the option (for typeahead). solidaria-components
shouldSelectOnPressUpfalse | true—Whether selection should occur on press up. solidaria
optionIdstring—Optional DOM id for the option element. Defaults to the key. solidaria
shouldFocusOnHoverfalse | true—Whether to focus the option on hover. solidaria
shouldUseVirtualFocusfalse | true—Whether the option should use virtual focus instead of receiving DOM focus. solidaria
focus() => void—Function to focus the option, overriding the default DOM focus. Forwarded into `createSelectableItem` (`useSelectableItem` `focus`). solidaria
allowsDifferentPressOriginfalse | true—Whether press-up may occur without the press starting on this option. solidaria

Declared in packages/viviana-ui/src/selectboxgroup/index.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.