PHPackages                             hipszkij/nova-tabs - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. hipszkij/nova-tabs

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

hipszkij/nova-tabs
==================

Laravel Nova - Tabs.

v2.2.6(2y ago)013MITPHPPHP ^7.4|^8

Since Nov 30Pushed 2y ago1 watchersCompare

[ Source](https://github.com/hipszkij/nova-tabs)[ Packagist](https://packagist.org/packages/hipszkij/nova-tabs)[ RSS](/packages/hipszkij-nova-tabs/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (5)Versions (4)Used By (0)

[![Nova Tabs, awesome resource tabs for Nova](banner.png)](banner.png)

---

[![Latest Version on Github](https://camo.githubusercontent.com/6d6d48bceb2a154e999f9887d03d1331380d75c68a90c1516b9aebbfbdfd5974/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f656d696e69617274732f6e6f76612d746162732e7376673f7374796c653d666c6174)](https://packagist.org/packages/eminiarts/nova-tabs)

1. [Requirements](#Requirements)
2. [Installation](#Installation)
3. [Usage](#Usage)
    1. [Tabs Panel](#tabs-panel)
    2. [Relationship Tabs](#relationship-tabs)
    3. [Combine Fields and Relations in Tabs](#combine-fields-and-relations-in-tabs)
    4. [Actions in Tabs](#actions-in-tabs)
    5. [Tabs on Edit View](#tabs-on-edit-view)
4. [Tab object](#tab-object)
5. [Customization](#customization)
    1. [Tab](#tab)
    2. [Default search](#default-search)
    3. [Display more than 5 items](#display-more-than-5-items)
    4. [Tab change Global Event](#tab-change-global-event)
6. [Upgrade to V2](#upgrade-to-v2)

Requirements
------------

[](#requirements)

- `php: ^7.4 | ^8`
- `laravel/nova: ^4`

For Laravel Nova Version 3, please use nova-tabs v1 instead.

Installation
------------

[](#installation)

You can install the package in to a Laravel app that uses [Nova](https://nova.laravel.com) via composer:

```
composer require eminiarts/nova-tabs
```

Usage
-----

[](#usage)

### Tabs Panel

[](#tabs-panel)

[![image](https://user-images.githubusercontent.com/3426944/50060698-7835ec00-0197-11e9-8b9c-c7f1e67400db.png)](https://user-images.githubusercontent.com/3426944/50060698-7835ec00-0197-11e9-8b9c-c7f1e67400db.png)

You can group fields of a resource into tabs.

```
// in app/Nova/Resource.php

use Eminiarts\Tabs\Traits\HasTabs;
use Eminiarts\Tabs\Tabs;
use Eminiarts\Tabs\Tab;

class User extends Resource
{
    use HasTabs;

    public function fields(Request $request)
    {
       return [
         Tabs::make('Some Title', [
            Tab::make('Balance', [
                Number::make('Balance', 'balance'),
                Number::make('Total', 'total'),
            ]),
            Tab::make('Other Info', [
                Number::make('Paid To Date', 'paid_to_date')
            ]),
         ]),
      ];
    }
 }
```

The first tab in every `Tabs` instance will be auto-selected.

### Relationship Tabs

[](#relationship-tabs)

[![image](https://user-images.githubusercontent.com/3426944/50060715-a3b8d680-0197-11e9-8f98-1cac8cf3fd83.png)](https://user-images.githubusercontent.com/3426944/50060715-a3b8d680-0197-11e9-8f98-1cac8cf3fd83.png)These are a bit outdated, as the search and create buttons now show within the panel down where the actual content is displayed, not in the tab panel.

```
// in app/Nova/Resource.php

use Eminiarts\Tabs\Tabs;
use Laravel\Nova\Fields\HasMany;
use Eminiarts\Tabs\Traits\HasTabs;

class User extends Resource
{
    use HasTabs;

    public function fields(Request $request)
    {
        return [
           Tabs::make('Relations', [
                HasMany::make('Invoices'),
                HasMany::make('Notes'),
                HasMany::make('Contacts')
            ]),

        ];
    }
}
```

### Combine Fields and Relations in Tabs

[](#combine-fields-and-relations-in-tabs)

[![image](https://user-images.githubusercontent.com/3426944/51089909-b3b2de80-1774-11e9-9100-d323accda7db.png)](https://user-images.githubusercontent.com/3426944/51089909-b3b2de80-1774-11e9-9100-d323accda7db.png)

[![image](https://user-images.githubusercontent.com/3426944/51089905-aa297680-1774-11e9-9611-4446ca13ab4a.png)](https://user-images.githubusercontent.com/3426944/51089905-aa297680-1774-11e9-9611-4446ca13ab4a.png)

```
use Eminiarts\Tabs\Tabs;
use Laravel\Nova\Fields\HasMany;
use Eminiarts\Tabs\Traits\HasTabs;

use Laravel\Nova\Fields\ID;
use Laravel\Nova\Fields\Text;

class User extends Resource
{
    use HasTabs;

    public function fields(Request $request)
    {
          return [
              Tabs::make(__('Client Custom Details'), [
                  new Panel(__('Details'), [
                          ID::make('Id', 'id')->rules('required')->hideFromIndex(),
                          Text::make('Name', 'name'),
                  ]),
                  HasMany::make('Invoices')
              ]),
         ];
    }
}
```

### Actions in Tabs

[](#actions-in-tabs)

If your Model uses the `Laravel\Nova\Actions\Actionable` Trait you can put the Actions into a Tab like this:

```
// in app/Nova/Resource.php

use Eminiarts\Tabs\Tabs;
use Eminiarts\Tabs\Tab;
use Eminiarts\Tabs\Traits\HasTabs;
use Eminiarts\Tabs\Traits\HasActionsInTabs; // Add this Trait
use Laravel\Nova\Actions\ActionResource; // Import the Resource

class Client extends Resource
{
    use HasTabs;
    use HasActionsInTabs; // Use this Trait

    public function fields(Request $request)
    {
        return [
            Tabs::make('Client Custom Details', [
                Tab::make('Address', [
                    ID::make('Id', 'id'),
                    Text::make('Name', 'name')->hideFromDetail(),
                ]),
                Tab::make('Invoices', [
                    HasMany::make('Invoices'),
                ]),
                Tab::make('Actions', [
                    $this->actionfield(), // Add Actions whererver you like.
                ]),
            ]),
        ];
    }
}
```

### Tabs on Edit View

[](#tabs-on-edit-view)

[![image](https://user-images.githubusercontent.com/3426944/51790797-055a6080-219a-11e9-8da4-33a621093265.png)](https://user-images.githubusercontent.com/3426944/51790797-055a6080-219a-11e9-8da4-33a621093265.png)

Tabs are always shown on edit view as of Nova 4 for now.

Tab object
----------

[](#tab-object)

As of v1.4.0 it's possible to use a `Tab` class instead of an array to represent your tabs.

PropertyTypeDefaultDescriptionname`string``null`The name of the tab, used for the slug. Defaults to the title if not setshowIf`bool` or `Closure``null`If the result is truthy the tab will be shown. `showIf` takes priority over `showUnless` and if neither are set, `true` is assumed.showUnless`bool` or `Closure``null`If the result is falsy the tab will be shown. `showIf` takes priority over `showUnless` and if neither are set, `true` is assumed.bodyClass`string` or `array`Empty arrayA string or string array of classes to add to the tab's body. This sets the `bodyClass` property, if you want to append you can use `addBodyClass` instead.Customization
-------------

[](#customization)

### Display more than 5 items

[](#display-more-than-5-items)

By default, any `HasMany`, `BelongsToMany` and `MorphMany` fields show 5 items in their index. You can use Nova's built-in static property `$perPageViaRelationship` on the respective resource to show more (or less).

### Tab change Global Event

[](#tab-change-global-event)

Nova Tabs emits an event upon tabs loading and the user clicking on a tab, using [Nova Event Bus](https://nova.laravel.com/docs/4.0/customization/frontend.html#event-bus). Developers can listen to the event called `nova-tabs-changed`, with 2 parameters as payload: The tab panel name and the tab name itself.

Example of a component that subscribes to this event:

```
export default {
    mounted () {
        Nova.$on('nova-tabs-changed', (panel, tab) => {
            if (panel === 'Client Details' && tab === 'address') {
                this.$nextTick(() => this.map.updateSize())
            }
        })
    }
}
```

Upgrade to 2.0.0
----------------

[](#upgrade-to-200)

- Breaking changes
    - Removed selectFirstTab, first tab is always displayed first.
    - Even if you have other panels, tabs will always show up first and has the toolbar.
    - TabsOnEdit is gone and non relational tabs will simply always display on edit.
    - I don't use dusk, so didn't check the tests for it either, they might be broken.
    - Added Eminiarts\\Tabs\\Traits\\HasTabs to overwrite Nova 4 default panel methods in Laravel\\Nova\\ResolveFields.
    - Moved Eminiarts\\Tabs\\ActionsInTabs to Eminiaarts\\Tabs\\Traits\\HasActionsInTabs.
    - Added position method to Tab to fix relational tabs showing up last.

Credits
-------

[](#credits)

Banner was created with

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor3

3 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

891d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/218a5e28b144c61cf5ca0a2a373e68215be1e87158527c2d5b79ab53e3d70ed3?d=identicon)[hipszkij](/maintainers/hipszkij)

---

Top Contributors

[![RVxLab](https://avatars.githubusercontent.com/u/46111684?v=4)](https://github.com/RVxLab "RVxLab (83 commits)")[![bajramemini](https://avatars.githubusercontent.com/u/3426944?v=4)](https://github.com/bajramemini "bajramemini (77 commits)")[![marcflp](https://avatars.githubusercontent.com/u/1815234?v=4)](https://github.com/marcflp "marcflp (67 commits)")[![ackermann](https://avatars.githubusercontent.com/u/4266125?v=4)](https://github.com/ackermann "ackermann (23 commits)")[![crynobone](https://avatars.githubusercontent.com/u/172966?v=4)](https://github.com/crynobone "crynobone (17 commits)")[![ianrobertsFF](https://avatars.githubusercontent.com/u/91917328?v=4)](https://github.com/ianrobertsFF "ianrobertsFF (16 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (9 commits)")[![bernhardh](https://avatars.githubusercontent.com/u/642292?v=4)](https://github.com/bernhardh "bernhardh (6 commits)")[![rderks88](https://avatars.githubusercontent.com/u/15908998?v=4)](https://github.com/rderks88 "rderks88 (4 commits)")[![HenriqueSPin](https://avatars.githubusercontent.com/u/12719645?v=4)](https://github.com/HenriqueSPin "HenriqueSPin (3 commits)")[![kosmonowt](https://avatars.githubusercontent.com/u/1159594?v=4)](https://github.com/kosmonowt "kosmonowt (2 commits)")[![niekdemelker](https://avatars.githubusercontent.com/u/17333258?v=4)](https://github.com/niekdemelker "niekdemelker (2 commits)")[![JaZo](https://avatars.githubusercontent.com/u/3475007?v=4)](https://github.com/JaZo "JaZo (2 commits)")[![Gertiozuni](https://avatars.githubusercontent.com/u/26062255?v=4)](https://github.com/Gertiozuni "Gertiozuni (2 commits)")[![johanvanhelden](https://avatars.githubusercontent.com/u/19389981?v=4)](https://github.com/johanvanhelden "johanvanhelden (2 commits)")[![feldsam](https://avatars.githubusercontent.com/u/951648?v=4)](https://github.com/feldsam "feldsam (2 commits)")[![vbezruchkin](https://avatars.githubusercontent.com/u/2760455?v=4)](https://github.com/vbezruchkin "vbezruchkin (1 commits)")[![bastihilger](https://avatars.githubusercontent.com/u/1419634?v=4)](https://github.com/bastihilger "bastihilger (1 commits)")[![elijahworkz](https://avatars.githubusercontent.com/u/34365440?v=4)](https://github.com/elijahworkz "elijahworkz (1 commits)")[![Emeto](https://avatars.githubusercontent.com/u/23660290?v=4)](https://github.com/Emeto "Emeto (1 commits)")

---

Tags

laravelnova

###  Code Quality

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/hipszkij-nova-tabs/health.svg)

```
[![Health](https://phpackages.com/badges/hipszkij-nova-tabs/health.svg)](https://phpackages.com/packages/hipszkij-nova-tabs)
```

###  Alternatives

[eminiarts/nova-tabs

Laravel Nova - Tabs.

4624.1M20](/packages/eminiarts-nova-tabs)[outl1ne/nova-sortable

This Laravel Nova package allows you to reorder models in a Nova resource's index view using drag &amp; drop.

2861.8M9](/packages/outl1ne-nova-sortable)[sbine/route-viewer

A Laravel Nova tool to view your registered routes.

57215.9k](/packages/sbine-route-viewer)[markwalet/nova-modal-response

A Laravel Nova asset for Modal responses on an action.

14720.0k](/packages/markwalet-nova-modal-response)[datomatic/nova-enum-field

A Laravel Nova PHP 8.1 enum field with filters

20134.2k](/packages/datomatic-nova-enum-field)[norman-huth/nova-assets-changer

Change Nova resources

2570.1k](/packages/norman-huth-nova-assets-changer)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
