PHPackages                             chiwex/nova-tabss - 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. chiwex/nova-tabss

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

chiwex/nova-tabss
=================

Laravel Nova - Tabs.

1.4.4(5y ago)07MITPHPPHP &gt;=7.1.3

Since Dec 17Pushed 5y agoCompare

[ Source](https://github.com/chiwex/nova-tabss)[ Packagist](https://packagist.org/packages/chiwex/nova-tabss)[ RSS](/packages/chiwex-nova-tabss/feed)WikiDiscussions master Synced 5d ago

READMEChangelog (1)Dependencies (2)Versions (36)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. [Installation](#Installation)
2. [Usage](#Usage)
    1. [Tabs Panel](#tabs-panel)
    2. [Tabs Panel with Toolbar](#tabs-panel-with-toolbar)
    3. [Relationship Tabs](#relationship-tabs)
    4. [Combine Fields and Relations in Tabs](#combine-fields-and-relations-in-tabs)
    5. [Actions in Tabs](#actions-in-tabs)
    6. [Tabs on Edit View](#tabs-on-edit-view)
3. [Tab object](#tab-object)
4. [Customization](#customization)
    1. [Tab](#tab)
    2. [Default search](#default-search)
    3. [Display more than 5 items](#display-more-than-5-items)
5. [Upgrade to 1.0.0](#upgrade-to-1.0.0)

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, you can use an array or a Tab object (as of 1.4.0)::

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

use Eminiarts\Tabs\Tabs;

public function fields()
{
    return [

        new Tabs('Tabs', [
            'Balance'    => [
                Number::make('Balance', 'balance'),
                Number::make('Total', 'total'),
            ],
            'Other Info' => [
                Number::make('Paid To Date', 'paid_to_date'),
            ],
        ]),

    ];
}
```

or

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

use Eminiarts\Tabs\Tabs;
use Eminiarts\Tabs\Tab;

public function fields()
{
    return [
        Tabs::make('Tabs', [
            Tab::make('Balance', [
                Number::make('Balance', 'balance'),
                Number::make('Total', 'total'),
            ]),
            Tab::make('Other Info', [
                Number::make('Paid To Date', 'paid_to_date')
            ]),
        ]),

    ];
}
```

### Tabs with Toolbar

[](#tabs-with-toolbar)

If you are only using Tabs without another default Panel, you can set `withToolbar` to `true`.

[![image](https://user-images.githubusercontent.com/3426944/50448780-608efe00-0923-11e9-9d55-3dc3d8d896e1.png)](https://user-images.githubusercontent.com/3426944/50448780-608efe00-0923-11e9-9d55-3dc3d8d896e1.png)

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

use Eminiarts\Tabs\Tabs;
use Eminiarts\Tabs\Tab;

public function fields(Request $request)
{
    return [
        Tabs::make('Contact Details', [
            Tab::make('Address', [
                ID::make('Id', 'id')->rules('required'),
                Text::make('Email', 'email')->sortable(),
                Text::make('Phone', 'phone')->sortable(),
            ]),
            Tab::make('Relations', [
                BelongsTo::make('User'),
                MorphTo::make('Contactable')->types([
                    Client::class,
                    Invoice::class,
                ]),
            ]),
        ])->withToolbar(),
    ];
}
```

### 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)

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

use Eminiarts\Tabs\Tabs;

class User extends Resource
{
    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;

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\ActionsInTabs; // Add this Trait
use Laravel\Nova\Actions\ActionResource; // Import the Resource

class Client extends Resource
{
    use ActionsInTabs; // 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.
                ]),
            ])->withToolbar(),
        ];
    }
}
```

### 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)

If you want to show Tabs on the Edit View, use the `TabsOnEdit` Trait in your Resource.

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

use Eminiarts\Tabs\Tabs;
use Eminiarts\Tabs\TabsOnEdit; // Add this Trait

class Client extends Resource
{
    use TabsOnEdit; // Use this Trait
    //...
}
```

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.titleAsHtml`bool``false`Whether the given title should be rendered as HTML. **This potentially leaves you vulnerable for an XSS attack. Take precaution using this.**beforeIcon`string``null`An icon (or anything else really) you want to render in front of the title. **This potentially leaves you vulnerable for an XSS attack. Take precaution using this.**afterIcon`string``null`An icon (or anything else really) you want to render behind the title. **This potentially leaves you vulnerable for an XSS attack. Take precaution using this.**tabClass`string` or `array`Empty arrayA string or string array of classes to add to the tab. This sets the `tabClass` property, if you want to append you can use `addTabClass` instead.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)

### Default search

[](#default-search)

By default, the Tabs component moves the search input and the create button to the tabs. If you have a lot of tabs, you can move them back down to its own line:

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

use Eminiarts\Tabs\Tabs;

class User extends Resource
{

    public function fields(Request $request)
    {
        return [
            Tabs::make('Relations', [
                HasMany::make('Invoices')
            ])->defaultSearch(true),
        ];
    }
}
```

Set `->defaultSearch(true)` to revert it to its default.

[![image](https://user-images.githubusercontent.com/3426944/50060732-dbc01980-0197-11e9-8f0c-6014132539a2.png)](https://user-images.githubusercontent.com/3426944/50060732-dbc01980-0197-11e9-8f0c-6014132539a2.png)

### 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).

Upgrade to 1.0.0
----------------

[](#upgrade-to-100)

Thanks to [dkulyk/nova-tabs](https://github.com/dkulyk/nova-tabs) the Package got a lot simpler.

- No need to use a Trait anymore. Remove all `AvailableTabFields` Traits in your Resources.
- Everything is in `Tabs` now. There is no `TabsPanel` anymore. Remove all `TabsPanels` and adjust your Fields according to this Readme.

Credits
-------

[](#credits)

Banner was created with

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor2

2 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 ~29 days

Recently: every ~13 days

Total

29

Last Release

1874d ago

Major Versions

0.3.2 → 1.0.02019-01-26

PHP version history (2 changes)0.0.1PHP &gt;=7.1.0

1.4.0PHP &gt;=7.1.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/82de017fec50c9c2bc5ff30933457f99fbcb99fa66c25aad549f526158919ced?d=identicon)[chiwex](/maintainers/chiwex)

---

Top Contributors

[![bajramemini](https://avatars.githubusercontent.com/u/3426944?v=4)](https://github.com/bajramemini "bajramemini (77 commits)")[![RVxLab](https://avatars.githubusercontent.com/u/46111684?v=4)](https://github.com/RVxLab "RVxLab (63 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (9 commits)")[![techbly](https://avatars.githubusercontent.com/u/7074565?v=4)](https://github.com/techbly "techbly (7 commits)")[![bernhardh](https://avatars.githubusercontent.com/u/642292?v=4)](https://github.com/bernhardh "bernhardh (6 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)")[![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)")[![elijahworkz](https://avatars.githubusercontent.com/u/34365440?v=4)](https://github.com/elijahworkz "elijahworkz (1 commits)")[![bastihilger](https://avatars.githubusercontent.com/u/1419634?v=4)](https://github.com/bastihilger "bastihilger (1 commits)")[![LorenzoSapora](https://avatars.githubusercontent.com/u/25519274?v=4)](https://github.com/LorenzoSapora "LorenzoSapora (1 commits)")[![marcoraddatz](https://avatars.githubusercontent.com/u/248815?v=4)](https://github.com/marcoraddatz "marcoraddatz (1 commits)")[![vbezruchkin](https://avatars.githubusercontent.com/u/2760455?v=4)](https://github.com/vbezruchkin "vbezruchkin (1 commits)")[![pbrisson](https://avatars.githubusercontent.com/u/3892766?v=4)](https://github.com/pbrisson "pbrisson (1 commits)")[![royduin](https://avatars.githubusercontent.com/u/1703233?v=4)](https://github.com/royduin "royduin (1 commits)")[![Emeto](https://avatars.githubusercontent.com/u/23660290?v=4)](https://github.com/Emeto "Emeto (1 commits)")[![chinleung](https://avatars.githubusercontent.com/u/19669331?v=4)](https://github.com/chinleung "chinleung (1 commits)")[![funkdoobiest](https://avatars.githubusercontent.com/u/352664?v=4)](https://github.com/funkdoobiest "funkdoobiest (1 commits)")

---

Tags

laravelnova

###  Code Quality

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/chiwex-nova-tabss/health.svg)

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

###  Alternatives

[optimistdigital/nova-multiselect-field

A multiple select field for Laravel Nova.

3403.5M7](/packages/optimistdigital-nova-multiselect-field)[digital-creative/conditional-container

Provides an easy way to conditionally show and hide fields in your Nova resources.

116593.8k4](/packages/digital-creative-conditional-container)[genealabs/laravel-overridable-model

Provide a uniform method of allowing models to be overridden in Laravel.

92398.0k2](/packages/genealabs-laravel-overridable-model)[inspheric/nova-defaultable

Default values for Nova fields when creating resources and running resource actions.

51174.8k1](/packages/inspheric-nova-defaultable)[murdercode/nova4-tinymce-editor

Boost your Laravel Nova with the TinyMCE editor.

17165.2k](/packages/murdercode-nova4-tinymce-editor)[yieldstudio/nova-google-autocomplete

A Laravel Nova Google autocomplete field.

12218.4k](/packages/yieldstudio-nova-google-autocomplete)

PHPackages © 2026

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