Giter VIP home page Giter VIP logo

autocomplete-input.js's Introduction

Client side of Autocomplete text input for Nette forms

Build Status Latest stable

Installation

Via npm:

$ npm install @nepada/autocomplete-input --save

Via yarn:

$ yarn add @nepada/autocomplete-input

Usage

This package provides corejs-typeahead based client side for nepada/autocomplete-input.

Using precompiled JS bundle

Using precompiled bundles is the quick'n'dirty way of getting client side validation to work.

<script src="https://unpkg.com/jquery@%5E3.5.0/dist/jquery.min.js"></script>
<script src="https://unpkg.com/corejs-typeahead@%5E1.3.1/dist/typeahead.bundle.min.js"></script>
<script src="https://unpkg.com/nette-forms@%5E3.0.3/src/assets/netteForms.min.js"></script>
<script src="https://unpkg.com/nette-forms@%5E1.0.0/dist/js/autocomplete-input.min.js"></script>

Building your own JS bundle

It is highly recommended to install the client side package via nmp/yarn and compile your own bundle.

Here is an example script for initialization of phone number input and Nette forms.

import Nette from 'nette-forms';
import initializeAutocompleteInput from '@nepada/autocomplete-input';

initializeAutocompleteInput(Nette);
Nette.initOnLoad();

Bootstrap 5 support

  • Include _bootstrap5.scss partial into your SCSS styles.
  • Use customized typeahead factory during JS initialization:
import Nette from 'nette-forms';
import {default as initializeAutocomplete, bootstrap5TypeaheadFactory} from '@nepada/autocomplete-input';

initializeAutocomplete(Nette, bootstrap5TypeaheadFactory);
Nette.initOnLoad();

Bootstrap 4 support

autocomplete-input.js's People

Contributors

xificurk avatar dependabot[bot] avatar

Stargazers

 avatar  avatar

Watchers

 avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.