PHPackages                             nepada/autocomplete-input - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. nepada/autocomplete-input

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

nepada/autocomplete-input
=========================

Autocomplete text input for Nette forms.

v1.3.3(5mo ago)811.5k↓50%[3 PRs](https://github.com/nepada/autocomplete-input/pulls)BSD-3-ClausePHPPHP &gt;=8.1.0 &lt;8.6CI failing

Since Apr 30Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/nepada/autocomplete-input)[ Packagist](https://packagist.org/packages/nepada/autocomplete-input)[ RSS](/packages/nepada-autocomplete-input/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (9)Dependencies (21)Versions (14)Used By (0)

Autocomplete text input
=======================

[](#autocomplete-text-input)

[![Build Status](https://github.com/nepada/autocomplete-input/workflows/CI/badge.svg)](https://github.com/nepada/autocomplete-input/actions?query=workflow%3ACI+branch%3Amaster)[![Coverage Status](https://camo.githubusercontent.com/bddd7a603a7810b754b5aae655996c2ebe1a64b8e89fb2a29465f900c125184f/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6e65706164612f6175746f636f6d706c6574652d696e7075742f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/nepada/autocomplete-input?branch=master)[![Downloads this Month](https://camo.githubusercontent.com/f8aa53701d67b4f2d40f6a7015f5e3386d653d082d52581844915a3d00383a9c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f6e65706164612f6175746f636f6d706c6574652d696e7075742e737667)](https://packagist.org/packages/nepada/autocomplete-input)[![Latest stable](https://camo.githubusercontent.com/6f220a6106cd89f6f7494bd29390c2b4085fb6a155c35a0ad54e57a2d65ba3d5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e65706164612f6175746f636f6d706c6574652d696e7075742e737667)](https://packagist.org/packages/nepada/autocomplete-input)

Installation
------------

[](#installation)

Via Composer:

```
$ composer require nepada/autocomplete-input
```

### Option A: install form container extension method via DI extension

[](#option-a-install-form-container-extension-method-via-di-extension)

```
extensions:
    - Nepada\Bridges\AutocompleteInputDI\AutocompleteInputExtension
```

It will register extension method `addAutocomplete($name, $label, callable $dataSource): AutocompleteInput` to `Nette\Forms\Container`.

### Option B: use trait in your base form/container class

[](#option-b-use-trait-in-your-base-formcontainer-class)

You can also use `AutocompleteInputMixin` trait in your base form/container class to add method `addAutocomplete($name, $label, callable $dataSource): AutocompleteInput`.

Example:

```
trait FormControls
{

    use Nepada\Bridges\AutocompleteInputForms\AutocompleteInputMixin;

    public function addContainer($name)
    {
        $control = new Container;
        $control->setCurrentGroup($this->getCurrentGroup());
        if ($this->currentGroup !== null) {
            $this->currentGroup->add($control);
        }
        return $this[$name] = $control;
    }

}

class Container extends Nette\Forms\Container
{

    use FormControls;

}

class Form extends Nette\Forms\Form
{

    use FormControls;

}
```

Usage
-----

[](#usage)

`AutocompleteInput` is a standard text input from Nette enhanced with the autocomplete feature. The input exposes URL to retrieve the entries matching a specified query - you need to pass data source callback when creating the input:

```
$autocompleteInput = $form->addAutocomplete('foo', 'Foo', function (string $query) {
    // return entries matching the query
});
$autocompleteInput->setAutocompleteMinLength(3); // set minimum input length to trigger autocomplete
```

### Client side

[](#client-side)

The backend form control is not tightly coupled to any specific client side implementation. The rendered input contains data attributes with all the necessary settings:

```

```

If you do not want to roll out your own client side solution, try [@nepada/autocomplete-input](https://yarnpkg.com/package/@nepada/autocomplete-input) npm package.

###  Health Score

54

—

FairBetter than 97% of packages

Maintenance79

Regular maintenance activity

Popularity29

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity81

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 68.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~254 days

Total

9

Last Release

176d ago

PHP version history (5 changes)v1.0.0PHP &gt;=7.4.0

v1.2.1PHP &gt;=7.4.0 &lt;8.3

v1.3.0PHP &gt;=8.1.0 &lt;8.4

v1.3.2PHP &gt;=8.1.0 &lt;8.5

v1.3.3PHP &gt;=8.1.0 &lt;8.6

### Community

Maintainers

![](https://www.gravatar.com/avatar/5b4780fe328102c4572737db639653c29d3081d1d3e051467f00d7f09a776399?d=identicon)[xificurk](/maintainers/xificurk)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (168 commits)")[![xificurk](https://avatars.githubusercontent.com/u/117465?v=4)](https://github.com/xificurk "xificurk (77 commits)")

---

Tags

autocompletenetteformtypeahead

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/nepada-autocomplete-input/health.svg)

```
[![Health](https://phpackages.com/badges/nepada-autocomplete-input/health.svg)](https://phpackages.com/packages/nepada-autocomplete-input)
```

###  Alternatives

[nette/code-checker

✅ Nette CodeChecker: A simple tool to check source code against a set of Nette coding standards.

881.7M6](/packages/nette-code-checker)[nasext/dependent-select-box

Dependent Select Box for Nette Framework.

21262.8k2](/packages/nasext-dependent-select-box)[uestla/twigrid

Experimental DataGrid for Nette Framework

1712.3k2](/packages/uestla-twigrid)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
