Skip to contents

Create a List component

Usage

calcite_list(...)

Arguments

...

named attributes passed to htmltools::tag()

Value

an object of class calcite_component which is a subclass of shiny.tag

Details

A general purpose list that enables users to construct list items that conform to Calcite styling.

Properties

The following properties are provided by this component:

NameAttributeDescriptionValuesReflects to Attribute
canPullNAWhen provided, the method will be called to determine whether the element can move from the list.(detail: ListDragDetail) => booleanFALSE
canPutNAWhen provided, the method will be called to determine whether the element can be added from another list.(detail: ListDragDetail) => booleanFALSE
disableddisabledWhen true, interaction is prevented and the component is displayed with lower opacity.booleanTRUE
displayModedisplay-modeSpecifies the nesting behavior of calcite-list-items, where "flat" displays calcite-list-items in a uniform list, and "nested" displays calcite-list-items under their parent element. The parent component's behavior should follow throughout its child elements."flat" | "nested"TRUE
dragEnableddrag-enabledWhen true, calcite-list-items are sortable via a draggable button.booleanTRUE
filteredDataNAThe currently filtered calcite-list-item data.Check API referenceFALSE
filteredItemsNAThe currently filtered calcite-list-items.Check API referenceFALSE
filterEnabledfilter-enabledWhen true, an input appears at the top of the component that can be used by end users to filter calcite-list-items.booleanTRUE
filterLabelfilter-labelSpecifies an accessible name for the filter input field.stringTRUE
filterPlaceholderfilter-placeholderPlaceholder text for the component's filter input field.stringTRUE
filterPredicateNASpecifies a function to handle filtering.(item: HTMLCalciteListItemElement) => booleanFALSE
filterPropsNASpecifies the properties to match against when filtering. If not set, all properties will be matched (label, description, metadata, value, group heading).Check API referenceFALSE
filterTextfilter-textText for the component's filter input field.stringTRUE
groupgroupThe list's group identifier. To drag elements from one list into another, both lists must have the same group value.stringTRUE
interactionModeinteraction-modeSpecifies the interaction mode of the component. "interactive" allows interaction styling and pointer changes on hover "static" does not allow interaction styling and pointer changes on hover The "static" value should only be used when selectionMode is "none"."interactive" | "static"TRUE
labellabelSpecifies an accessible name for the component. When dragEnabled is true and multiple list sorting is enabled with group, specifies the component's name for dragging between lists.stringFALSE
loadingloadingWhen true, a busy indicator is displayed.booleanTRUE
messageOverridesNAUse this property to override individual strings used by the component.Check API referenceFALSE
numberingSystemnumbering-systemSpecifies the Unicode numeral system used by the component for localization."arab" | "arabext" | "latn"FALSE
scalescaleSpecifies the size of the component."l" | "m" | "s"TRUE
selectedItemsNAThe currently selected items.Check API referenceFALSE
selectionAppearanceselection-appearanceSpecifies the selection appearance - "icon" (displays a checkmark or dot) or "border" (displays a border)."border" | "icon"TRUE
selectionModeselection-modeSpecifies the selection mode of the component, where: "multiple" allows any number of selections, "single" allows only one selection, "single-persist" allows one selection and prevents de-selection, and "none" does not allow any selections."multiple" | "none" | "single" | "single-persist"TRUE

Events

The following events are observed by shiny:

EventDescription
calciteListChangeFires when the component's selected items have changed.
calciteListDragEndFires when the component's dragging has ended.
calciteListDragStartFires when the component's dragging has started.
calciteListFilterFires when the component's filter has changed.
calciteListOrderChangeFires when the component's item order changes.

Slots

The following slots are provided by this component:

SlotDescription
Default (unnamed)A slot for adding calcite-list-item and calcite-list-item-group elements.
filter-actions-startA slot for adding actionable calcite-action elements before the filter component.
filter-actions-endA slot for adding actionable calcite-action elements after the filter component.
filter-no-resultsWhen filterEnabled is true, a slot for adding content to display when no results are found.

Examples

calcite_list()
#> <calcite-list></calcite-list>