Socket
Socket
Sign inDemoInstall

tb-vue3-typeahead

Package Overview
Dependencies
21
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    tb-vue3-typeahead

Typeahead for Vue3


Version published
Weekly downloads
2
increased by100%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Install:

npm i tb-vue3-typeahead

Example:

<template>
    <Typeahead
        :data='data'
        :inputStyle="{
                backgroundColor: 'white',
                width: '460px',
                height: '35px',
                border: 'solid 1px black',
                fontSize: '20px'
            }"
        placeholder="Search..."
        @tb-typeahead-result="TbTypeaheadResult"
    >
    </Typeahead>
</template>

<script>

    import Typeahead from 'tb-vue3-typeahead';

    import { ref } from 'vue';

    export default {
        components: {
            Typeahead
        },
        setup() {

            const data = ref([
                'Avon',
                'Bedfordshire',
                'Berkshire',
                'Buckinghamshire',
                'Cambridgeshire',
                'Cheshire',
                'City of London',
                'Cleveland',
                'Cornwall',
                'Cumbria',
                'Derbyshire',
                'Devon',
                'Dorset',
                'Durham',
                'East Sussex',
                'Essex',
                'Gloucestershire',
                'Greater London',
                'Greater Manchester',
                'Hampshire',
                'Herefordshire',
                'Hertfordshire',
                'Isle of Wight',
                'Kent',
                'Lancashire',
                'Leicestershire',
                'Lincolnshire',
                'Merseyside',
                'Middlesex',
                'Norfolk',
                'Northamptonshire',
                'Northumberland',
                'North Humberside',
                'North Yorkshire',
                'Nottinghamshire',
                'Oxfordshire',
                'Rutland',
                'Shropshire',
                'Somerset',
                'South Humberside',
                'South Yorkshire',
                'Staffordshire',
                'Suffolk',
                'Surrey',
                'Tyne and Wear',
                'Warwickshire',
                'West Midlands',
                'West Sussex',
                'West Yorkshire',
                'Wiltshire',
                'Worcestershire'
            ]);

            function TbTypeaheadResult(result) {
                console.log(result)
            }
            return { data, TbTypeaheadResult}

        }
    }
</script>

Props:

   inputStyle: Style The Input Field
   
   ulStyle: Style The ul Tag For Results
   
   liStyle: Style The li Tags For Results

Keywords

FAQs

Last updated on 10 Oct 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc