Search by

meghdadfadaee / nova-form-dock

MeghdadFadaee

An adaptive, accessible action dock for long Laravel Nova resource forms.

Package info

github.com/MeghdadFadaee/nova-form-dock

pkg:composer/meghdadfadaee/nova-form-dock

Statistics

Installs: 65

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.0 2026-09-15 13:06 UTC

This package is auto-updated.

Last update: 2026-09-15 13:12:32 UTC


README

Tests Latest Version on Packagist License

Nova Form Dock adds an adaptive action dock to long Laravel Nova 5 resource forms. It keeps Nova's original form buttons and behavior while making those actions continuously available on long create and update pages.

Features

  • Activates only when a form is taller than the viewport by default.
  • Supports create and update pages without changing Nova resources.
  • Excludes inline relationship modals and attached-resource forms.
  • Measures the dock so it never covers the final form fields.
  • Follows Nova's content width, including responsive and RTL layouts.
  • Supports top, bottom, left, and right docks with configurable alignment.
  • Supports Nova dark mode, compact mobile actions, safe areas, and reduced motion.
  • Ships compiled assets; consuming applications do not need an NPM build.

Installation

Install this package in an existing Laravel Nova 5.9.5 or newer application. Your application must already have valid Composer credentials for Nova's licensed package repository.

composer require meghdadfadaee/nova-form-dock

The service provider is discovered automatically. To publish the optional configuration file:

php artisan vendor:publish --tag=nova-form-dock-config

Configuration

Use mode => 'always' to dock supported forms regardless of their height. The resources.only and resources.except arrays accept Nova resource URI keys.

return [
    'enabled' => true,
    'mode' => 'automatic',
    'minimum_form_height' => null,
    'forms' => [
        'create' => true,
        'update' => true,
    ],
    'resources' => [
        'only' => [],
        'except' => [],
    ],
    'appearance' => [
        'position' => 'bottom',
        'mobile_position' => 'bottom',
        'alignment' => 'end',
        'compact_mobile' => true,
        'floating_gap' => 12,
    ],
];

When minimum_form_height is null, the current viewport height is used as the activation threshold.

position and mobile_position accept top, bottom, left, or right. Keeping mobile_position set to bottom gives side docks a more usable mobile fallback. alignment accepts start, center, or end; start and end follow the document direction for horizontal docks.

Compatibility

This release targets Laravel Nova 5.9.5 or newer and PHP 8.2 or newer. The package fails safely when it cannot recognize Nova's full-page create or update form markup.

License

Nova Form Dock is open-source software licensed under the MIT license.