Skip to main content
PROYECTOVIVIANA

ListView

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

Import

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

Props

Props for ListView in @proyecto-viviana/ui
PropTypeDefaultDescription
children*JSX.Element | ((item: T) => JSX.Element)—The ListView items. Use static ListViewItem children or a render function with `items`.
itemsT[]—The items to render for dynamic collections.
isQuietfalse | true—Whether the ListView should draw without the default container chrome.
selectionStyle'checkbox' | 'highlight''checkbox'How selection is visualized.
overflowMode'wrap' | 'truncate''truncate'Whether labels and descriptions truncate or wrap.
hideLinkOutIconfalse | true—Hides the external-link trailing icon on link items.
loadingState'idle' | 'loading' | 'loadingMore' | 'sorting' | 'filtering' | 'error'—Loading state forwarded to load-more behavior.
renderActionBar(selectedKeys: "all" | Set<Key>) => JSX.Element—Provides an action bar when items are selected.
stylesStyleString—Spectrum-defined generated classes.
UNSAFE_classNamestring | UnsafeClassName—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 grid list root element.
size'sm' | 'md' | 'lg'—Legacy GridList size alias retained for compatibility.
variant'default' | 'bordered' | 'cards'—Legacy GridList variant alias retained for compatibility.
layout'grid' | 'list'—Legacy GridList layout alias retained for compatibility.
columnsnumber | "auto"—Legacy GridList columns alias retained for compatibility.
labelnumber | boolean | RenderedElement | ArrayElement | (string & {}) | Node | JSX.ArrayElement—Legacy label helper. Prefer aria-label or aria-labelledby.
descriptionnumber | boolean | RenderedElement | ArrayElement | (string & {}) | Node | JSX.ArrayElement—Legacy description helper.
idstring—ID for the grid list element. solidaria
onSelectionChange(keys: "all" | Set<Key>) => void—Handler called when selection changes. solidaria-components
aria-describedbystring—ARIA describedby for the grid list. solidaria
aria-labelstring—ARIA label for the grid list. solidaria
aria-labelledbystring—ARIA labelledby for the grid list. solidaria
isDisabledfalse | true—Whether the grid list is disabled. solidaria
selectionMode'none' | 'single' | 'multiple'—The selection mode. solidaria-components
selectedKeys"all" | Iterable<Key>—Currently selected keys (controlled). solidaria-components
defaultSelectedKeys"all" | Iterable<Key>—Default selected keys (uncontrolled). solidaria-components
orientation'horizontal' | 'vertical''vertical'The primary orientation of the items. Usually this is the direction that the collection scrolls. solidaria-components
onAction(key: Key) => void—Handler for item actions. solidaria
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 grid list is empty. solidaria-components
dragAndDropHooksDragAndDropHooks<T>—Drag and drop hooks from `useDragAndDrop`. solidaria-components
isVirtualizedfalse | true—Whether the grid list uses virtual scrolling. solidaria
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
keyboardNavigationBehavior'tab' | 'arrow'"arrow"How keyboard navigation should behave within rows. `"arrow"` treats the collection as a single tab stop and uses arrow keys to move through row children. `"tab"` lets tabbable row children participate in normal tab order and stops child key events before collection navigation. solidaria
direction'ltr' | 'rtl'"ltr"The text direction, used to flip the inline navigation axis in a horizontal orientation. solidaria
columnCountnumber—Column count for `layout="grid"` Down/Up. When omitted, Down/Up walk document order. 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

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

ListViewItem props

Props for ListViewItem in @proyecto-viviana/ui
PropTypeDefaultDescription
id*Key—The unique id of the ListViewItem.
childrennumber | boolean | RenderedElement | ArrayElement | (string & {}) | Node | JSX.ArrayElement | ((renderProps: GridListItemRenderProps) => JSX.Element)—The contents of the item.
isDisabledfalse | true—Whether this item is disabled. Static collections support this directly; dynamic collections can also use `getDisabled`.
hasChildItemsfalse | true—Whether this item navigates into child content.
hrefstring—Link target metadata for visual parity with React Spectrum's link-out affordance.
targetstring—Not yet documented
downloadstring | boolean—Not yet documented
relstring—Not yet documented
hrefLangstring—Not yet documented
pingstring—Not yet documented
referrerPolicystring—Not yet documented
routerOptionsunknown—Router options forwarded to client router navigation, when href is provided.
descriptionnumber | boolean | RenderedElement | ArrayElement | (string & {}) | Node | JSX.ArrayElement—Optional description text. Prefer `<Text slot="description">`.
icon() => JSX.Element—Optional icon helper retained from the older GridList API.
imagestring—Optional image helper retained from the older GridList API.
imageAltstring—Alt text for the image helper.
stylesStyleString—Spectrum-defined generated classes.
UNSAFE_classNamestring | UnsafeClassName—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.
refHTMLDivElement | ((el: HTMLDivElement) => void) | { current?: HTMLDivElement | null | undefined; }—Ref for the rendered row element.
slotstring | false—A slot name for the component. HTML `slot` may be `false` to omit. solidaria-components
onAction() => void—Handler called when the item is activated. solidaria-components
itemT—The item value. solidaria-components
textValuestring—The text value of the item (for accessibility). solidaria-components

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