2.0.2 • Published 4 years ago

vue2-superplaceholder v2.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

vue2-superplaceholder

SuperPlaceholder component based on superplaceholder.js for Vue 2.x.

superplaceholder.js is a library to bring your input placeholders to life by cycling multiple instructions in a single input placeholder.

circle-ci npm version Dependencies npm downloads code style: prettier License: MIT


Installation

# yarn
$ yarn add vue2-superplaceholder

# npm
$ npm install vue2-superplaceholder --save

Example

<template>
  <super-placeholder
    :sentences="['Something to show', 'Another thing to show']"
    v-model="form.email"
    :options="{ cursor: '_' }"
  >
  </super-placeholder>
</template>

<script>
import SuperPlaceholder from 'vue2-superplaceholder';

export default {
  data() {
    return {
      form: {
        email: null,
      },
    };
  },
  components: {
    SuperPlaceholder,
  },
};
</script>

Customization

Optional options object for custom settings.

options: {
		// delay between letters (in milliseconds)
		letterDelay: 100, // milliseconds
		// delay between sentences (in milliseconds)
		sentenceDelay: 1000,
		// should start on input focus. Set false to autostart
		startOnFocus: true, // [DEPRECATED]
		// loop through passed sentences
		loop: false,
		// Initially shuffle the passed sentences
		shuffle: false,
		// Show cursor or not. Shows by default
		showCursor: true,
		// String to show as cursor
		cursor: '|',
		// Control onFocus behaviour. Default is `superplaceholder.Actions.START`
		onFocusAction: superplaceholder.Actions.[NOTHING|START|STOP]
		// Control onBlur behaviour. Default is `superplaceholder.Actions.STOP`
 		onBlurAction: superplaceholder.Actions.[NOTHING|START|STOP]
	}
2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

5 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago