AgentStack
SKILL verified MIT Self-run

El Autocomplete

skill-jiaiyan-element-plus-skills-el-autocomplete · by jiaiyan

Autocomplete component for input suggestions. Invoke when user needs to provide input suggestions, autocomplete functionality, or search-as-you-type features.

No reviews yet
0 installs
9 views
0.0% view→install

Install

$ agentstack add skill-jiaiyan-element-plus-skills-el-autocomplete

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

Are you the author of El Autocomplete? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Autocomplete Component

Autocomplete provides input suggestions based on user input.

When to Use

  • Search suggestions
  • Form autocomplete
  • Address inputs
  • Quick selection from options

Basic Usage


  

import { ref, onMounted } from 'vue'

const state = ref('')
const links = ref([])

const querySearch = (queryString, cb) => {
  const results = queryString
    ? links.value.filter(createFilter(queryString))
    : links.value
  cb(results)
}

const createFilter = (queryString) => {
  return (restaurant) => {
    return (
      restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0
    )
  }
}

const handleSelect = (item) => {
  console.log(item)
}

onMounted(() => {
  links.value = [
    { value: 'vue', link: 'https://github.com/vuejs/vue' },
    { value: 'element', link: 'https://github.com/ElemeFE/element' },
    { value: 'cooking', link: 'https://github.com/ElemeFE/cooking' }
  ]
})

Custom Template


  
    
      {{ item.value }}
      {{ item.link }}
    
  

Remote Search


  

import { ref } from 'vue'

const state = ref('')

const querySearchAsync = (queryString, cb) => {
  fetch(`/api/search?q=${queryString}`)
    .then(res => res.json())
    .then(data => cb(data))
}

API Reference

Attributes

| Name | Description | Type | Default | |------|-------------|------|---------| | model-value / v-model | Binding value | string | — | | placeholder | Placeholder | string | — | | disabled | Whether disabled | boolean | false | | value-key | Key for display value | string | 'value' | | debounce | Debounce delay (ms) | number | 300 | | placement | Popup placement | Placement enum | 'bottom-start' | | fetch-suggestions | Method to fetch suggestions | (queryString, cb) => void | — | | popper-class | Custom popup class | string | — | | trigger-on-focus | Trigger on focus | boolean | true | | name | Native name attribute | string | — | | select-when-unmatched | Select on enter even if no match | boolean | false | | label | Label text | string | — | | hide-loading | Hide loading icon | boolean | false | | popper-append-to-body | Append popup to body | boolean | true | | highlight-first-item | Highlight first item | boolean | false |

Events

| Name | Description | Type | |------|-------------|------| | select | Triggers when a suggestion is selected | (item) => void | | change | Triggers when input value changes | (value: string) => void | | input | Triggers on input | (value: string) => void | | focus | Triggers on focus | (event: Event) => void | | blur | Triggers on blur | (event: Event) => void | | clear | Triggers on clear | () => void |

Slots

| Name | Description | Type | |------|-------------|------| | default | Custom suggestion item | { item } | | prefix | Prefix content | — | | suffix | Suffix content | — | | prepend | Prepend content | — | | append | Append content | — |

Best Practices

  1. Use debounce to reduce API calls
  2. Implement fetch-suggestions for async data
  3. Use custom templates for rich suggestions

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.