For vue2 projects, use @94ai/common-ui
LLMs.md

nf-variable-select ​

Searchable popover variable picker with field aliases, grouped results and custom group labels. The default slot supplies the trigger.

Examples ​

Basic usage ​

Loading example…
Basic usage

Advanced usage ​

Loading example…
Advanced usage

Props ​

Text props follow the library language when omitted; defaults below use this language.

ParameterDescriptionTypeOptionsDefault
dataData to display or restore.VariableItem[]—[]
valueAliasAlias for the value field.string—'name'
keyAliasAlias for the key field.string—'paramId'
placementPopup placement.stringtop / top-start / top-end / bottom / bottom-start / bottom-end / left / left-start / left-end / right / right-start / right-end'bottom'
widthPopup width.string | number—'160'
triggerTrigger mode; manual is controlled externally through visible.stringclick / focus / hover / manual'click'
visibleControlled visibility; supports v-model:visible.boolean—undefined
popperClassCustom class for the popup.string—''
disabledWhether to disable the component.boolean—false
offsetPopup offset in pixels.number—0
transitionPopup transition name.string—'fade-in-linear'
visibleArrowWhether to show the popup arrow.boolean—true
popperOptionsPopper 2 options; use modifiers to customize positioning.Record<string, unknown>—{}
openDelayShow delay for hover, in milliseconds.number—undefined
closeDelayHide delay for hover, in milliseconds.number—200
tabindextabindex of the trigger.number—0
noMatchDescCustomize the “No matching data” text.string—No matching data
placeholderCustomize the “Search by variable name” text.string—Search by variable name
sizeControl size; mini maps to small and medium to default.stringmini / small / medium / default / large'mini'
groupableEnable grouping.boolean—false
groupKeyGrouping field; required when groupable is true.string—''
groupLabelsGroup label mapping: keys are groupKey values and values are display text.Record<string, string>—{}

Events ​

EventDescriptionPayload
variate-clickFires when a variable is clicked; returns the selected object.(item: VariableItem)
after-enterFires after the show transition finishes.—
hiddenFires when hidden.—
showFires when shown.—
after-leaveFires after the hide transition finishes.—
update:visibleUpdate the bound value.(visible: boolean)

Slots ​

ParameterDescriptionPayload
defaultDOM content that triggers the dropdown.—

Exposed methods and state ​

  • keyword
  • list
  • groupedList
  • handleItem(item)

Migration notes ​

Vue 3 uses modelValue / update:modelValue; legacy value, update:value and input remain available on selection components. The implementation uses public Element Plus APIs, not Element UI internals. mini maps to small; medium maps to default.