Download the PHP package tacman/ux-search without Composer
On this page you can find all versions of the php package tacman/ux-search. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tacman/ux-search
More information about tacman/ux-search
Files in tacman/ux-search
Package ux-search
Short Description TEMPORARY soft-fork of mezcalito/ux-search (unchanged Mezcalito\ namespace) carrying patches survos/search-bundle needs. Remove once Mezcalito/ux-search PRs #49 and #50 are merged and released.
License MIT
Homepage https://github.com/tacman/ux-search
Informations about the package ux-search
Mezcalito UX Search — tacman/ux-search soft-fork
[!WARNING] This is a temporary soft-fork of
mezcalito/ux-search. It is published astacman/ux-searchandreplacesmezcalito/ux-search, but keeps the originalMezcalito\UxSearchBundlenamespace — there are no code/import changes. It exists only to carry patches thatsurvos/search-bundledepends on while they are in review upstream: Mezcalito/ux-search#49 and #50. When those are merged and released, this fork will be marked abandoned in favor of the upstream package. Depend onmezcalito/ux-searchdirectly unless you specifically need those patches.
A powerful, flexible, and easy-to-use search and faceted search system for Symfony applications, built with Twig Components and Live Components.
View Live Demo | Report Issues
Why Use This Bundle?
- 🚀 Quick Setup: Get a working search in minutes with the maker command
- 🔌 Multiple Adapters: Support for Algolia, Meilisearch, and Doctrine ORM
- 🎨 Fully Customizable: Override templates and components to match your design
- ⚡ Live Updates: Built with Symfony UX Live Components for reactive UI
- 🎯 Faceted Search: Rich filtering with refinement lists, range sliders, and more
- 📦 Production Ready: Used in production with comprehensive test coverage
Features
- Multiple Search Configurations: Create and manage multiple searches, each with its own unique configuration
- Flexible Adapters:
- Algolia: Cloud-based search with advanced features
- Meilisearch: Self-hosted open-source search engine
- Doctrine ORM: Use your existing database for small datasets
- Rich UI Components: Pre-built components for search input, facets, pagination, sorting, and more
- Faceted Navigation: Multiple facet types (refinement lists, range inputs, range sliders)
- Live Components: Real-time updates without page reloads
- Event System: Customize search behavior with pre/post search events
- SEO Friendly: URL rewriting support for search parameters
- Customizable: Override any template or extend any component
Requirements
- PHP 8.3 or higher
- Symfony 6.4+ or 7.0+ or 8.0+
- Symfony UX (Live Components, Twig Components)
Installation
Install the bundle via Composer:
If you're not using Symfony Flex, you'll need to manually register the bundle in config/bundles.php:
Quick Start
1. Configure an Adapter
Create a configuration file config/packages/mezcalito_ux_search.yaml:
Add the DSN to your .env file (choose one):
2. Create Your First Search
Use the maker command to generate a search class:
The command will ask you for:
- Index name: For Algolia/Meilisearch, the index name. For Doctrine, the entity FQCN (e.g.,
App\Entity\Product) - Search name (optional): Custom name for your search (defaults to class name without "Search" suffix)
- Adapter (optional): Which adapter to use (defaults to
default_adapter)
This creates a search class in src/Search/ that you can customize.
3. Render the Search in Your Template
In any Twig template:
That's it! You now have a working search with facets, pagination, and live updates. 🎉
Choosing an Adapter
Three adapters are available, each with different strengths:
| Adapter | Best For | Performance | Cost | Setup Complexity |
|---|---|---|---|---|
| Algolia | Production, large datasets | ⭐⭐⭐ | 💰 Paid | Easy |
| Meilisearch | Self-hosted production | ⭐⭐⭐ | 🆓 Free | Medium |
| Doctrine | Development, small datasets | ⭐⭐ | 🆓 Free | Very Easy |
Adapter DSN Format
| Adapter | DSN Format | Documentation |
|---|---|---|
| Algolia | algolia://apiKey@appId |
View docs |
| Meilisearch | meilisearch://key@host:port |
View docs |
| Doctrine | doctrine://entityManagerName |
View docs |
Need another provider? You can create your own adapter.
Customizing Your Search
Adding Facets, Sorting, and More
Once you've created a search class, customize it by editing the build() method:
📖 Full customization guide
Customizing the UI
The bundle provides a complete set of UI components that you can use individually or override:
Core Components
| Component | Description | Documentation |
|---|---|---|
| Layout | Root wrapper component containing all search elements | Docs |
| SearchInput | Text search input with live updates | Docs |
| Hits | Display search results with customizable item templates | Docs |
| Pagination | Navigate through search results | Docs |
Facet Components
| Component | Description | Documentation |
|---|---|---|
| RefinementList | Checkbox/radio list for categorical filtering | Docs |
| RangeInput | Min/max input fields for numeric ranges | Docs |
| RangeSlider | Slider for numeric range filtering | Docs |
Utility Components
| Component | Description | Documentation |
|---|---|---|
| CurrentRefinements | Display active filters with remove buttons | Docs |
| ClearRefinements | Button to clear all active filters | Docs |
| SortBy | Dropdown to change sort order | Docs |
| TotalHits | Display total number of results | Docs |
Overriding Templates
You can override any component template by creating a file in your app's templates/ directory:
Custom Hit Template
The most common customization is the hit (result item) template. Override Hits.html.twig:
Advanced Usage
Event System
Customize search behavior with event subscribers:
📖 Event system documentation
Multiple Search Configurations
You can have multiple search configurations in one application:
Each search can have its own adapter, facets, and configuration.
Documentation
Getting Started
- Installation & Quick Start
- Choosing an Adapter
- Customizing Your Search
Adapters
- Algolia Configuration
- Meilisearch Configuration
- Doctrine Configuration
- Creating a Custom Adapter
Components
- Layout - Root wrapper
- SearchInput - Search box
- Hits - Results display
- Pagination - Page navigation
- Facets - All facet components
- View all components
Advanced
- Customizing Your Search - Facets, sorting, events
- Component Customization - Override templates and behavior
Contributing
Contributions are welcome! Here's how you can help:
- Report bugs - Open an issue with a clear description
- Request features - Suggest new features with use cases
- Submit PRs - Fork, create a feature branch, and submit a pull request
- Improve docs - Documentation improvements are always appreciated
Development Setup
Support
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Demo: Live Demo
License
This bundle is released under the MIT License.
All versions of ux-search with dependencies
nyholm/psr7 Version ^1.0
phpdocumentor/reflection-docblock Version ^5.4|^6.0
symfony/asset Version ^6.4|^7.0|^8.0
symfony/config Version ^6.4|^7.0|^8.0
symfony/dependency-injection Version ^6.4|^7.0|^8.0
symfony/http-client Version ^6.4|^7.0|^8.0
symfony/options-resolver Version ^6.4|^7.0|^8.0
symfony/serializer Version ^6.4|^7.0|^8.0
symfony/ux-live-component Version ^2.20|^3.0
symfony/ux-twig-component Version ^2.20|^3.0
twig/twig Version ^3.8