Download the PHP package hoceineel/filament-quick-action-dock without Composer

On this page you can find all versions of the php package hoceineel/filament-quick-action-dock. 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-quick-action-dock

Quick Action Dock

Quick Action Dock for Filament

A floating launcher for the actions your team uses most, on every page of a Filament 4 or 5 panel. Each item is a regular Filament Action, so forms, modals, confirmation, authorization, URLs, badges and key bindings work as they do anywhere else.

The speed dial open on the Filament demo's Orders page

Requirements

Installation

The dock ships pre-built CSS and JS, so you don't need a custom theme or a Vite build. Filament apps usually run filament:upgrade on post-autoload-dump, which republishes the assets on every composer update. If yours doesn't, add php artisan filament:assets to your deploy script.

Quick start

A round button appears in the bottom corner of every page once you sign in. Click it or press ⌘. (Ctrl+. on Windows and Linux) to open the dock.

Actions

Defining actions

actions() takes an array of actions or a closure that returns one. Use the closure when the list depends on the user, tenant or page, or when it calls something that needs a booted panel, such as Resource::getUrl().

Groups

group() adds a labelled section. Sections appear in the order you add them, and a group whose actions are all hidden disappears with its heading.

Modals and confirmation

Modal actions use Filament's modal with validation, modalHeading(), slideOver() and the rest. The speed dial closes when an item runs or a modal opens.

Form modal Confirmation
A form modal opened from the dock A confirmation modal opened from the dock

Badges and key bindings

Use Filament's badge() and badgeColor(). Return null to hide the badge.

Badges refresh whenever the dock re-renders, for example after a dock action runs. To refresh them on a timer, call pollBadges() (30 seconds by default, any Livewire interval, or a closure; null turns it off).

An action's key bindings work whether the dock is open, closed or hidden by a device rule. The first binding appears in the label chip as ⇧⌘O on Apple devices and Ctrl+Shift+O elsewhere, and is exposed through aria-keyshortcuts.

Badge and key binding hints next to dock items

Colors, visibility and authorization

icon(), color(), visible(), hidden(), authorize() and disabled() behave as usual:

Page and record context

After the first page load, dock requests go to livewire/update, so request()->routeIs() inside a dock closure describes the Livewire endpoint. DockContext remembers the page the dock was rendered on:

Helper Returns
DockContext::routeIs(string ...$patterns) bool, wildcard match on the page's route name
DockContext::pathIs(string ...$patterns) bool, wildcard match on the URL path, ignoring outer slashes
DockContext::resource(string $resource, ?array $pages = null) Closure(): bool for ->visible(); $pages are keys from getPages()
DockContext::record() The current Model on record pages (EditRecord, ViewRecord, ...), or null
DockContext::current() The context, with getRouteName(), getRouteParameters(), getPath() and getPageClass()

A

Layouts

The speed dial opens a vertical stack with a label chip per item. It opens up or down depending on where the dock sits and closes on Escape, an outside click, after an item runs, or when a modal opens.

The bar is a horizontal row of icons with a tooltip on hover or focus. Its handle collapses it to one button, and the collapsed state is remembered. showLabels() puts permanent labels under the icons; the speed dial always shows labels. Below the mobile breakpoint the bar falls back to the speed dial.

The bar layout with a tooltip and key binding hint

The bar layout with permanent labels

Change the trigger with triggerIcon() (default Heroicon::Plus) and triggerLabel() (default "Quick actions", translated).

Styles

Style Look
Native (default) White or gray-900 surfaces, hairline border, small shadow
Outline Page-colored surfaces, 1px border, no shadow
Contrast Inverted: gray-950 in light mode, white in dark mode, monochrome icons
Tinted Primary-50 or primary-950 surfaces, primary icons, rounded squares

The four styles in light mode

The four styles in dark mode

Every style follows Filament's dark mode. The trigger always uses the panel's primary color.

The dock in dark mode

Position and dragging

BottomEnd and BottomStart follow the page direction. position() sets where the dock starts for users who haven't moved it and where Reset position puts it back. defaultPosition() is an alias.

Ways to move it:

Dragging Move dock
The dock lifted while being dragged The Move dock panel with four corners and a reset button

The position is saved in localStorage as qad:{panel id}:{user hash}:position, relative to the nearest edges, so it survives resizes, rotation and direction changes. The collapsed bar state uses qad:{panel id}:{user hash}:collapsed. The user hash is an HMAC of the user id keyed with APP_KEY; guests use guest.

With rememberPosition(false) every page load starts at position(). With draggable(false) the dock is fixed and the Move dock item is removed.

Visibility

Every rule accepts a closure and is checked on the server for the page the dock was rendered on, including Livewire requests. When the dock is hidden, its actions aren't registered, so they can't be called.

Users

Pages

visibleOn() is an allow list and hiddenOn() a deny list. Both take one rule, an array, or a closure. The deny list wins, and an empty allow list means every page.

Rule Example
Route name pattern 'filament.admin.resources.orders.*'
URL path pattern (contains /) '/admin/reports/*'
Resource class OrderResource::class
Resource pages [OrderResource::class, ['create', 'edit']]
Page class (and subclasses) Settings::class

'admin/reports/*' doesn't match admin/reports itself, so list both if you need both. hiddenOnAuthPages() is on by default and hides the dock on the panel's login, registration, password reset and verification routes.

Devices

Device rules are CSS media queries, so the dock reacts to resizing and action key bindings keep working while it's hidden. The breakpoint also decides when the bar becomes a speed dial and when the scrim appears.

The dock renders only when visible() passes, a user is signed in (unless authenticatedOnly(false)), visibleFor(), can() and roles() pass, the page rules match, and at least one action is visible. Device rules apply after that, in the browser.

Keyboard

Key Does
⌘. / Ctrl+. Open or close the dock (collapse or expand the bar)
↑ ↓ (speed dial), ← → (bar) Move between items, mirrored in RTL
Home / End First and last item
Escape Close and return focus to the trigger, or cancel a drag
Tab Leave the menu
Alt + arrows on the trigger Nudge the dock 24px
An action's key binding Run the action

Bindings use Filament's format. mod is ⌘ on Apple devices and Ctrl elsewhere; meta, ctrl, alt and shift also work. The toggle is ignored while a modal is open, and bindings without a modifier are ignored while typing.

Accessibility

The trigger is a button with aria-haspopup, aria-expanded, aria-controls and aria-keyshortcuts. The menu uses role="menu" with grouped menuitems and roving focus, so the dock is one Tab stop. Focus rings are two-tone, targets are at least 44px, colors meet WCAG AA in every style, dragging has keyboard alternatives, prefers-reduced-motion swaps movement for a fade, and the dock is hidden when printing.

Mobile

Below the breakpoint the dock always uses the speed dial, dims the page with a scrim while open, respects safe-area insets, and hides while a Filament modal is open.

The speed dial on a phone with a scrim behind it

Right-to-left

The dock follows the page's dir. In ar, fa and he it moves to the opposite corner, chips and tooltips swap sides and arrow keys follow the visual order. Nothing to configure.

The speed dial in an Arabic right-to-left panel

Translations

The dock's own strings ship in 23 locales: ar, cs, de, en, es, fa, fr, he, hi, id, it, ja, ko, nl, pl, pt, pt_BR, ru, tr, uk, vi, zh_CN and zh_TW. They follow the app locale and reuse Filament's wording for common words. Your action labels are translated like any other Filament action.

Published translations go to lang/vendor/quick-action-dock/{locale}/dock.php; keep only the keys you change. A published view stops receiving package fixes, so prefer CSS variables and translations.

Theming

The dock uses your panel's primary and gray palettes and font. Each style is a set of CSS custom properties on .qad-root, selected by [data-qad-style]:

Property Controls
--qad-surface, --qad-fill, --qad-border Surfaces and hairline border
--qad-ink, --qad-ink-muted Text colors
--qad-trigger-bg, --qad-trigger-bg-hover, --qad-trigger-fg Trigger button
--qad-item-bg, --qad-item-fg Item buttons; --qad-item-fg overrides action colors in Contrast and Tinted
--qad-chip-bg, --qad-chip-fg Label chips and bar tooltips
--qad-kbd-bg, --qad-kbd-fg Key binding hints
--qad-tint, --qad-press Hover and pressed backgrounds
--qad-ring, --qad-badge-ring Focus ring and the gap around badges and rings
--qad-well, --qad-selected-bg, --qad-selected-fg Move dock map and selected corner
--qad-shadow, --qad-shadow-lifted, --qad-chip-shadow Resting, dragging and chip shadows
--qad-radius, --qad-chip-radius, --qad-trigger-radius, --qad-bar-radius, --qad-panel-radius Corner radii
--qad-trigger-size, --qad-item-size, --qad-gap Sizes: 3.5rem, 2.75rem, 0.5rem
--qad-offset Edge distance, set by offset()
--qad-scrim Mobile scrim
--qad-enter, --qad-exit, --qad-ease, --qad-stagger, --qad-shift Motion
--qad-z Stacking order, 30 by default so modals stay on top

Other hooks: .qad-root[data-mode], [data-open], [data-position], [data-dragging], [data-moving], .qad-has-labels, .qad-trigger, .qad-item, .qad-label, .qad-group-label and .qad-move.

Multiple panels and tenants

Register the plugin on each panel that needs a dock, each with its own configuration. A panel's dock never renders on another panel. QuickActionDockPlugin::get() returns the current panel's instance. Any rule can read the tenant:

API reference

Every setter returns the plugin and accepts a closure.

Method Default
actions(array\|Closure $actions)
group(string\|Closure $label, array\|Closure $actions)
layout(DockLayout $layout) DockLayout::SpeedDial
style(DockStyle $style) DockStyle::Native
position(DockPosition $position), defaultPosition() DockPosition::BottomEnd
offset(int $pixels) 24
draggable(bool $condition = true) true
snapToEdges(bool $condition = true) true
rememberPosition(bool $condition = true) true
triggerIcon(string\|BackedEnum\|Htmlable\|null $icon) Heroicon::Plus
triggerLabel(?string $label) "Quick actions"
keyBindings(array\|string\|null $bindings) ['mod+.']
showLabels(bool $condition = true) false
pollBadges(?string $interval = '30s') off
visible(bool $condition = true) true
authenticatedOnly(bool $condition = true) true
guard(?string $guard) panel guard
visibleFor(Closure $callback)
authorize(string\|bool\|null $ability, mixed $arguments = []), can()
roles(array\|string\|null $roles)
visibleOn(array\|string $pages) every page
hiddenOn(array\|string $pages) []
hiddenOnAuthPages(bool $condition = true) true
hiddenOnMobile(bool $condition = true), visibleOnMobile() false
hiddenOnDesktop(bool $condition = true) false
mobileBreakpoint(int $pixels) 640

Each setter has a matching getter (getLayout(), isDraggable(), getActions(), shouldRender() and so on) for tests. The enums DockLayout, DockStyle and DockPosition live in HoceineEl\QuickActionDock\Enums.

Troubleshooting

The dock doesn't appear:

  1. Is the plugin registered on this panel?
  2. Did you run php artisan filament:assets? Otherwise quick-action-dock.js and .css return 404.
  3. Are you signed in and off the auth pages?
  4. Does a visibility, page or device rule exclude you?
  5. Is at least one action visible to you?

A request()->routeIs() check works on page load but fails after an action: use DockContext instead, because later requests hit livewire/update.

Changing position() doesn't move docks users have already moved. They can use Move dock, then Reset position, or you can clear the qad:{panel}:{hash}:position key.

With a Content Security Policy, the inline placement script and the device-rule style carry the Vite::cspNonce() nonce when one is set.

If the dock sits above or below another floating widget, adjust --qad-z.

Testing your dock

Test dock actions with Livewire against the QuickActionDock component, with the plugin's panel as the current panel and a signed-in user:

DockContext::current()->set($routeName, $parameters, $path) stands in for the page the dock was rendered on.

More from Hoceine

Paid packages for Filament 4 and 5 by the same author:

FilamentCraft
FilamentCraft
A visual website builder inside your Filament panel: drag sections onto a live canvas, edit against a preview, publish.
Media Library Pro
Media Library Pro
One shared media library: folders, tags, focal points, chunked uploads, duplicate detection and usage tracking.
Scheduler Pro
Scheduler Pro
Resource timelines, Gantt with dependencies, availability-aware booking, recurring events and Kanban boards.

Contributing

Command Runs
composer test Pest (vendor/bin/pest --parallel is faster)
composer analyse PHPStan
composer format Pint
npm run build Builds dist/ from resources/
npm test JavaScript unit tests
npm run test:e2e Playwright browser suite (set PLAYWRIGHT_CHROMIUM_EXECUTABLE to use another Chromium)
composer serve Workbench panel, sign in as [email protected] / password

The workbench reads query parameters and keeps them for the session: qad-style, qad-layout, qad-position, qad-locale, qad-dir, qad-labels=1, qad-poll=5s and qad-mobile=hidden.

To add a language, copy resources/lang/en/dock.php to a folder named after Filament's locale code, translate it and run composer test. A test checks that every locale has the same keys and placeholders as English.

Works well with

Changelog, security and license

See LICENSE.md.


All versions of filament-quick-action-dock with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
filament/filament Version ^4.0|^5.0
illuminate/contracts Version ^11.0|^12.0|^13.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 hoceineel/filament-quick-action-dock contains the following files

Loading the files please wait ...