PHPackages                             vojtys/typeahead - 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. vojtys/typeahead

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

vojtys/typeahead
================

Typeahead (twitter/typeahead.js) for Nette (nette.org) - Forms

v0.4.3(6y ago)22.0k2[1 issues](https://github.com/vojtys/typeahead/issues)BSD-3-ClauseJavaScriptPHP &gt;=7.1

Since Jul 14Pushed 4y ago1 watchersCompare

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

READMEChangelog (10)Dependencies (4)Versions (12)Used By (0)

Typeahead
=========

[](#typeahead)

Typeahead (twitter/typeahead.js) for Nette framework

Install
=======

[](#install)

```
$ composer require vojtys/typeahead
```

Versions
========

[](#versions)

StateVersionBranchNettePHPstable`v0.4.1``master``3.0+``>=7.1`stable`v0.3.3``master``2.4``>=5.6`Configuration
=============

[](#configuration)

```
extensions:
	typehead: Vojtys\Forms\Typeahead\TypeaheadExtension

typeahead:
	limit: 10
	minLength: 2
	highlight: true
```

Usage
=====

[](#usage)

Presenter/Control
-----------------

[](#presentercontrol)

```
public function createComponentTypeaheadForm(): Form
{
    $form = new Form();

    /** @var TypeaheadInput $typeahead */

    // name, label, display (input displayed value), suggestion callback
    $typeahead = $form->addTypeahead('typeahead', 'Typeahead', 'title', function($display, $q) {

        return $this->searchBy($q); // returns array result [title => 'foo', description => 'foo foo']
    });

    $typeahead->setPlaceholder('Začni psát...'); // initial placeholder

    // add handlebars templates (http://handlebarsjs.com/)

    // suggestion template
    $typeahead->setSuggestionTemplate(function(Html $template) {
        $inner = Html::el('div')->setText('{{title}} – {{description}}');

        return $template->addHtml($inner);
    });

    // empty template
    $typeahead->setNotFoundTemplate(function(Html $template) {
        $inner = Html::el('div')->setText('nic tu neni');

        return $template->addHtml($inner);
    });

    $form->addSubmit('ok', 'Odeslat');

    return $form;
}
```

css
---

[](#css)

```

```

js
--

[](#js)

Before `` element.

```

```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~171 days

Recently: every ~308 days

Total

11

Last Release

2248d ago

PHP version history (2 changes)v0.2PHP &gt;= 5.4

v0.4.1PHP &gt;=7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/b5675b484ae0ffe8749c8ecaa4e9919a96e6c1fc804d8c13b99a90cad259be9e?d=identicon)[vojtys](/maintainers/vojtys)

---

Top Contributors

[![vojtys](https://avatars.githubusercontent.com/u/2284429?v=4)](https://github.com/vojtys "vojtys (8 commits)")

### Embed Badge

![Health badge](/badges/vojtys-typeahead/health.svg)

```
[![Health](https://phpackages.com/badges/vojtys-typeahead/health.svg)](https://phpackages.com/packages/vojtys-typeahead)
```

###  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)[contributte/menu-control

Menu control for Nette framework

29108.6k1](/packages/contributte-menu-control)[radekdostal/nette-datetimepicker

DatePicker and DateTimePicker input controls for Nette Framework

13272.2k3](/packages/radekdostal-nette-datetimepicker)

PHPackages © 2026

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