All Projects → chinchang → Superplaceholder.js

chinchang / Superplaceholder.js

⚡Super charge your input placeholders

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Superplaceholder.js

Statusalert
Display Apple system-like self-hiding status alerts. It is well suited for notifying user without interrupting user flow in iOS-like way.
Stars: ✭ 809 (-17.28%)
Mutual labels:  accessibility
Sass A11ycolor
🌈 Generate the nearest accessible color with Sass.
Stars: ✭ 24 (-97.55%)
Mutual labels:  accessibility
Ember Accessibility
An EmberJS addon to help identify accessibility violations during development
Stars: ✭ 29 (-97.03%)
Mutual labels:  accessibility
Logging Helpers
Basic template helpers for printing messages out to the console. Useful for debugging context in templates. Should work with any template engine.
Stars: ✭ 5 (-99.49%)
Mutual labels:  helper
React Simple Img
🌅 React lazy load images with IntersectionObserver API and Priority Hints
Stars: ✭ 905 (-7.46%)
Mutual labels:  placeholder
Osmnx Examples
Usage examples, demos, and tutorials for OSMnx.
Stars: ✭ 863 (-11.76%)
Mutual labels:  accessibility
Responsive
📱 A super lightweight HTML, Sass, CSS, and JavaScript framework for building responsive websites
Stars: ✭ 772 (-21.06%)
Mutual labels:  accessibility
Better Chrome Native Video
Add keyboard support to Chrome's native HTML5 video player.
Stars: ✭ 31 (-96.83%)
Mutual labels:  accessibility
Itext7
iText 7 for Java represents the next level of SDKs for developers that want to take advantage of the benefits PDF can bring. Equipped with a better document engine, high and low-level programming capabilities and the ability to create, edit and enhance PDF documents, iText 7 can be a boon to nearly every workflow.
Stars: ✭ 913 (-6.65%)
Mutual labels:  accessibility
Sdras Helper
The main idea is to create a simple and intuitive help system.
Stars: ✭ 28 (-97.14%)
Mutual labels:  helper
Playbook Ios
📘A library for isolated developing UI components and automatically taking snapshots of them.
Stars: ✭ 830 (-15.13%)
Mutual labels:  accessibility
Vuex Mappers
Component agnostic Vuex mappers
Stars: ✭ 19 (-98.06%)
Mutual labels:  helper
Axegrinder
Crawl websites for accessibility issues from the command line.
Stars: ✭ 12 (-98.77%)
Mutual labels:  accessibility
Pacaur
[unmaintained] An AUR helper that minimizes user interaction
Stars: ✭ 818 (-16.36%)
Mutual labels:  helper
Instapy Gender Classification
🔎 Classification helper for sex classification feature of InstaPy
Stars: ✭ 30 (-96.93%)
Mutual labels:  helper
Pa11y Dashboard
Pa11y Dashboard is a web interface which helps you monitor the accessibility of your websites
Stars: ✭ 787 (-19.53%)
Mutual labels:  accessibility
Skeleton Elements
Skeleton elements - UI for improved perceived performance
Stars: ✭ 27 (-97.24%)
Mutual labels:  placeholder
Asterics
The Assistive Technology Rapid Integration & Construction Set
Stars: ✭ 34 (-96.52%)
Mutual labels:  accessibility
React Native Helpers
All helpers in one; iPhone series support, dimensions helper, hasNotch helper, normalize text helper and text helpers for React Native with very easy useEasy to use & awesome helpers for React Native.
Stars: ✭ 31 (-96.83%)
Mutual labels:  helper
A11yc
Check accessibility of target page and generate accessibility evaluate page and policy.
Stars: ✭ 13 (-98.67%)
Mutual labels:  accessibility

superplaceholder.js npm version

Super charge your input placeholders


DEMOInstallationUsage

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

Demo

Installation

superplaceholder.js is less than 1KB minified & gzipped.

  • NPM: npm install superplaceholder
  • Yarn: yarn add superplacholder
  • Bower: bower install superplaceholder
  • Download zip.

Note: superplaceholder.js supports AMD and commonJS module pattern out of the box.

Usage

Syntax

superplaceholder({
	el: <target_input_element>,
	sentences: <array_of_texts>,
	options: {} // optional customizable parameters
});

Basic

superplaceholder({
	el: document.querySelector('input'),
	sentences: [ 'Something to show', 'Another thing to show']
});

Customization

Pass an optional options object for custom settings.

superplaceholder({
	el: document.querySelector('input'),
	sentences: [ 'Something to show', 'Another thing to show'],
	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]
	}
});

Manually Controlling a superplaceholder instance:

// Complete manual control
const instance = superplaceholder({
 el: document.querySelector('input'),
 sentences: [ 'Any format works', 'http://yahoo.com', 'www.facebook.com', 'airbnb.com' ],
 options: {
  onFocusAction: superplaceholder.Actions.NOTHING
  onBlurAction: superplaceholder.Actions.NOTHING
 }
});

// Later, whenever you want
instance.start();
instance.stop();
instance.destroy(); // to completely remove superplaceholder from an input

Browser Support

superplaceholder.js works best on latest versions of Google Chrome, Firefox and Safari and Chrome mobile.

For all non-supported browsers, the library will graceful degradate without any explicit handling in your code.

Contributing

Interested in contributing features and fixes?

Read more on contributing.

Changelog

See the Changelog.

License

Copyright (c) 2019 Kushagra Gour, https://kushagragour.in This work is licensed under a Creative Commons Attribution-NoDerivatives 4.0 International License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].