Filament Plugins

Purchase

Navigation

By default, the Media Library adds a page called Media Library to your panel. This section describes how to modify the navigation & appearance of the library.

Title

You can change the default page title using the ->title() method:

app/Providers/Filament/YourPanelProvider.php
$plugin->title('Library')

Subheading

You can add a subheading to the page using the ->subheading() method:

app/Providers/Filament/YourPanelProvider.php
$plugin->subheading('Below, the interface allows you to manage the items in the media library.')

Slug

You can modify the default page slug (media-library) using the ->slug() method:

app/Providers/Filament/YourPanelProvider.php
$plugin->slug('library')

You can override the default navigation label using the ->navigationLabel() method:

app/Providers/Filament/YourPanelProvider.php
$plugin->navigationLabel('Library')

You can modify the navigation group using the ->navigationGroup() method:

app/Providers/Filament/YourPanelProvider.php
$plugin->navigationGroup('Blog')

You can modify the navigation sort using the ->navigationSort() method:

app/Providers/Filament/YourPanelProvider.php
$plugin->navigationSort(1)

You can modify the navigation parent item using the ->navigationParentItem() method:

app/Providers/Filament/YourPanelProvider.php
$plugin->navigationParentItem('Blog')

You can modify the default navigation icon (Heroicon::OutlinedPhotos) using the ->navigationIcon() method:

app/Providers/Filament/YourPanelProvider.php
$plugin->navigationIcon('heroicon-m-photos')

Active navigation icon

You can modify the navigation icon when it is active using the ->navigationIcon() method:

app/Providers/Filament/YourPanelProvider.php
$plugin->activeNavigationIcon('heroicon-m-photos')

You can add a badge to the navigation item using the ->navigationBadge() method:

app/Providers/Filament/YourPanelProvider.php
$plugin->navigationBadge('New')

You can modify the color of the navigation badge using the ->navigationBadgeColor() method:

app/Providers/Filament/YourPanelProvider.php
$plugin->navigationBadgeColor('gray')

use Filament\Support\Colors\Color;

$plugin->navigationBadgeColor(Color::Cyan)

You can add a badge tooltip to the navigation item using the ->navigationBadgeTooltip() method:

app/Providers/Filament/YourPanelProvider.php
$plugin->navigationBadgeTooltip('Pro-customers only')

Disable navigation registration

You can disable the navigation item using the ->shouldRegisterNavigation() method:

app/Providers/Filament/YourPanelProvider.php
$plugin->shouldRegisterNavigation(false)

Default display mode

By default, the Media Library displays files in a grid view. You can switch the default to list view using the ->defaultDisplayMode() method:

app/Providers/Filament/YourPanelProvider.php
use RalphJSmit\Filament\Explore\Filament\Schemas\Components\File\Version;

$plugin->defaultDisplayMode(Version::Row)

You can also set this per driver when using multiple drivers:

app/Providers/Filament/YourPanelProvider.php
$driver->defaultFileVersion(Version::Row)

File click behavior

By default, clicking a file in the Media Library shows its details in the file-info sidebar and toggles the file in the bulk selection. If you prefer clicking to only open the file details – so users select files explicitly using the checkbox or by holding Cmd/Ctrl or Shift while clicking – you can use the ->fileClickBehavior() method:

app/Providers/Filament/YourPanelProvider.php
use RalphJSmit\Filament\Explore\Filament\Schemas\Components\File\FileClickBehavior;

$plugin->fileClickBehavior(FileClickBehavior::View)

This also becomes the default for every MediaPicker field – you can still override it per field using the ->fileClickBehavior() method on the field itself.

© FilamentPlugins.com ✦ 2022 – 2026
PrivacyTerms & Conditions
All rights reserved.