1.0.4 • Published 3 years ago

shapla-search-form v1.0.4

Weekly downloads
8
License
MIT
Repository
github
Last release
3 years ago

shapla-search-form

A simple search form design for Vue js.

Table of contents

Installation

npm install --save shapla-search-form

Usage

Add the component:

import searchForm from 'shapla-search-form';

export default {
  name: 'Hello',

  components: {
    searchForm
  },
  
  methods: {
    searchInput(value){
      // Handle input event
    },
    searchSubmit(value){
      // Handle input event
    }
  }
}
<search-form @input="searchInput" @search="searchSubmit"></search-form>

Props

PropertyTypeRequiredDefaultDescription
valueStringno | Search value
fontSizeStringno | Form base font size. This can be used to control height
placeholderStringnoSearch …Input placeholder text
screenReaderTextStringnoSearch for:Screen reader text

Listeners

The component fires the following events:

input: When user type, it fires the event with value. search: When search is clicked, it fires the event with value.

<!-- template -->
<search-form @input="searchInput" @search="searchSubmit"></search-form>


<!-- method -->
methods: {
    searchInput(value){
        // Handle input event
    },
    searchSubmit(value){
        // Handle input event
    }
}
1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

4 years ago

1.0.1

5 years ago

1.0.0

5 years ago