Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Cascader Laravel Package

vlados/cascader

A cascading dropdown for Laravel Livewire and Alpine.js, inspired by Ant Design's Cascader. It renders a two-column desktop dropdown with search and a mobile bottom sheet, supports light and dark mode, two-level option arrays, and standard wire:model binding.

View on GitHub
Deep Wiki
Context7

A cascading dropdown component for Laravel Livewire with Alpine.js

Frequently asked questions about Cascader
How do I install vlados/cascader in a Laravel Livewire app?
Run composer require vlados/cascader, then publish the Alpine script with php artisan vendor:publish --tag=cascader-scripts. Import it in resources/js/app.js before Alpine.start() and register it inside an alpine:init listener as Alpine.data('cascader', cascader). Finally, make sure your Tailwind content globs cover the package Blade views so the dropdown classes are not purged. The stated requirements are PHP 8.2+, Laravel 11 to 13, Livewire 3 or 4, Alpine 3 and Tailwind.
Why does my Livewire cascader component render nothing?
The three common causes look identical: the Alpine component was never registered, the Tailwind classes were purged, or the script was never published. With Livewire 3 and 4, Alpine is bundled and started by Livewire, so importing Alpine yourself and calling Alpine.start() double-instantiates it and breaks both the cascader and Livewire reactivity. Register the component on alpine:init instead, and confirm your Tailwind content globs or @source rules include the package views.
What options array format does vlados/cascader expect?
The options prop takes a two-level array of parents, each with an optional children array. A parent that has children is a navigation node and cannot be selected itself, while a parent with no children is selectable directly. If the bound property already has a value on page load, the component derives the displayed label from the options, and you can override it with the selected-text prop.
Does the cascader bind back to Livewire with wire:model?
Yes, it uses standard wire:model binding, and wire:model.live with modifiers such as debounce.500ms gives live updates that work with Livewire validation. The older wire-model="field" prop still works but is deprecated and slated for removal, so prefer the standard attribute. No event-based or $wire.set integration is documented.
Can the cascader load options asynchronously or search on the server?
No. The option tree is a static PHP array passed to the component, there is no per-level async loading, and search is client-side only. Large taxonomies therefore hit a practical node-count ceiling where payload and DOM cost start to bite. If you need async loading, server-side search, or multi-select, this package is not the right fit.
How do I stop Tailwind from purging the cascader's styles?
Add the package views to your Tailwind content configuration, for example ./vendor/vlados/cascader/src/resources/views/**/*.blade.php. On Tailwind v4 use the equivalent @source directive instead of content globs. If you publish and edit the views, point the glob at your published copies. Without this, every class is purged and the dropdown renders unstyled.
Is vlados/cascader accessible and WCAG 2.2 AA compliant?
There is no conformance claim: Ant Design-inspired is a visual reference, not an accessibility guarantee. Keyboard navigation, ARIA combobox semantics, focus trap and scroll lock in the mobile bottom sheet, and screen-reader announcements for search results are all unverified. If WCAG 2.2 AA is a gating requirement for your customers, budget your own audit and remediation pass before shipping.
Is vlados/cascader safe to use in production?
Treat it as unproven: zero stars, zero dependents, a single maintainer, no reported CI or test suite, and no evidence of production use. The blast radius is small because it is a view-layer-only component with no migrations, persistence, queues or services, so the worst case is a broken form field rather than corrupted data. Pin an exact version, run composer audit in CI, and have a human review the published JavaScript that gets copied into your bundle. Isolate it behind an internal wrapper component so it can be swapped or removed cheaply.
Does the cascader support disabled nodes, clearable state, or translations?
Multi-select is out of scope and the documented feature set is hierarchical single-select only. Support for disabled nodes, clearable state, preselected values and a change hook for resetting dependent fields is not documented, so verify each behaviour in a spike. Blade views can be published and edited if you need translated strings, but there is no stated i18n file or support policy.
Does vlados/cascader work with Livewire 4 and Laravel 13?
The README states Laravel 11, 12 or 13 with Livewire 3 or 4 and Alpine 3, plus PHP 8.3+ for Laravel 13. The matrix is broad and the release metadata is forward-dated, so confirm the tag actually resolves on Packagist and is not a dev branch. Verify Tailwind v4 support rather than assuming it, and spike the component on your exact Laravel and Livewire combination before committing.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels