Weave Code
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
Filament Context Menu

Filament Context Menu Laravel Package

aymanalhattami/filament-context-menu

Add right‑click context menus to Filament pages and table cells using Filament Actions. Works on resource and custom pages, supports dividers, dark/light mode, and LTR/RTL. Includes Refresh, Go Back, and Go Forward actions. Filament v3–v5.

View on GitHub
Deep Wiki
Context7

Add a context menu (right click menu) for resource pages, custom pages and table cells of Filament Admin Panel.

Frequently asked questions about Filament Context Menu
How do I add a context menu to a Filament resource page?
Use the `PageHasContextMenu` trait on your resource page class. Define actions via Filament’s `actions()` method, then register them with the context menu using `contextMenuActions()`. The package automatically integrates them into the right-click menu.
Can I use this package with Filament v4 or v5?
Yes, but you must install the correct version: `aymanalhattami/filament-context-menu:^3.0` for Filament v5, `^2.0` for v4, and `^1.0` for v3. Check the [README](https://github.com/aymanalhattami/filament-context-menu) for version-specific installation commands.
How do I add a context menu to a specific table cell?
Replace your existing column with `ContextMenuTextColumn` (or similar) and define `contextMenuActions()` in the column class. This scopes the menu to that cell only, using the same Filament Actions system.
Are there built-in actions like 'Delete' or 'Export'?
No, but you can reuse any Filament Action (e.g., `DeleteAction`, `ExportAction`) by registering them in `contextMenuActions()`. The package includes `RefreshAction`, `GoBackAction`, and `GoForwardAction` out of the box.
Will this work with custom Filament pages (not resources)?
Yes, the package supports custom pages. Apply the `PageHasContextMenu` trait to your page class and define actions in the `getContextMenuActions()` method, just like you would for a resource.
Does the context menu support dark mode and RTL layouts?
Absolutely. The package automatically inherits Filament’s dark/light mode and RTL/LTR direction settings, ensuring visual consistency without additional configuration.
How do I add dividers between menu items?
Use the `contextMenuDivider()` method in your actions array. For example: `contextMenuActions([...], contextMenuDivider(), [...])`. This works for both page-level and table-cell menus.
Can I dynamically update the context menu based on user roles?
Yes, but you’ll need to conditionally return actions in `getContextMenuActions()`. Use Filament’s built-in auth helpers (e.g., `auth()->user()->can()`) to filter actions server-side before rendering.
Are there performance concerns for large tables (e.g., 10K+ rows)?
The package renders menus on-demand (right-click), so performance impact is minimal. For very large datasets, consider lazy-loading actions or using Filament’s built-in pagination to reduce row count.
What if I need a custom action not covered by Filament’s Actions?
Extend Filament’s `Action` class and register it via `contextMenuActions()`. For complex logic (e.g., API calls), use Filament’s `UrlAction` or `ModalAction` as a base, then override the `handle()` method.
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.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky