Download the PHP package giacomomasseron/filament-textinput-autocomplete without Composer

On this page you can find all versions of the php package giacomomasseron/filament-textinput-autocomplete. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package filament-textinput-autocomplete

Filament TextInput Autocomplete

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

A Filament v5 form field: a free-text input with an autocomplete dropdown. Suggestions can be static (filtered in the browser) or fetched from the server through Livewire. Each suggestion's markup is rendered by PHP via a single itemView() setter.

Screenshots

Static options (filtered client-side):

Server search (via Livewire, optionally calling an external API):

Requirements

Installation

The compiled Alpine component and CSS ship in dist/ and are registered with Filament automatically — no npm step is required to use the package. As with any Filament plugin that registers assets, publish them once (and on each deploy) so the stylesheet is served:

Usage

Static options (filtered client-side)

Server search (via Livewire; may call an external API)

Item rendering

itemView() accepts three forms, resolved by type:

If itemView() is not set, the item's optionLabel value is shown as escaped text.

Configuration reference

Method Default Purpose
options(array\|Closure) — Static client-side source
searchKeys(array) ['label'] Item keys matched in static mode
getSearchResultsUsing(Closure) — Server source; receives string $search
itemView(string\|Closure) label (escaped) View name, raw-HTML closure, or {key} template
optionLabel(string) 'label' Item key shown in the input on select
optionValue(string) 'value' Item key stored as form state
minChars(int) 1 Minimum characters before searching
searchDebounce(int) 300 Debounce (ms) for server search
maxResults(int) 10 Max suggestions returned
placeholder(string\|Closure) — Input placeholder
noResultsMessage(string) 'No results found' Empty-state text
loadingMessage(string) 'Loading...' Loading-state text

options() and getSearchResultsUsing() are mutually exclusive — setting both throws an InvalidArgumentException. maxResults must be at least 1.

Styling

The field ships with a self-contained default style (a light input with a #667eea focus accent and a shadowed dropdown) so it looks consistent out of the box without depending on your panel's theme. It is served as a registered Filament CSS asset (dist/autocomplete.css, published via php artisan filament:assets). The styles are scoped to these classes:

Class Element
.fi-ac-wrapper The relative-positioned container
.fi-ac-input The text input
.fi-ac-dropdown The suggestions dropdown
.fi-ac-item A single suggestion (active row: .fi-ac-item--active)
.fi-ac-empty Loading / no-results text (error row: .fi-ac-empty--error)

To restyle, override any of these classes in your own stylesheet. Markup inside each suggestion is whatever your itemView() returns, so you control that completely.

Development

License

MIT


All versions of filament-textinput-autocomplete with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
filament/filament Version ^5.0
spatie/laravel-package-tools Version ^1.16
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package giacomomasseron/filament-textinput-autocomplete contains the following files

Loading the files please wait ...