Getting started
Library
Components
Integrations
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:
$plugin->title('Library')
Subheading
You can add a subheading to the page using the ->subheading() method:
$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:
$plugin->slug('library')
Navigation label
You can override the default navigation label using the ->navigationLabel() method:
$plugin->navigationLabel('Library')
Navigation group
You can modify the navigation group using the ->navigationGroup() method:
$plugin->navigationGroup('Blog')
Navigation sort
You can modify the navigation sort using the ->navigationSort() method:
$plugin->navigationSort(1)
Navigation parent item
You can modify the navigation parent item using the ->navigationParentItem() method:
$plugin->navigationParentItem('Blog')
Navigation icon
You can modify the default navigation icon (Heroicon::OutlinedPhotos) using the ->navigationIcon() method:
$plugin->navigationIcon('heroicon-m-photos')
Active navigation icon
You can modify the navigation icon when it is active using the ->navigationIcon() method:
$plugin->activeNavigationIcon('heroicon-m-photos')
Navigation badge
You can add a badge to the navigation item using the ->navigationBadge() method:
$plugin->navigationBadge('New')
Navigation badge color
You can modify the color of the navigation badge using the ->navigationBadgeColor() method:
$plugin->navigationBadgeColor('gray')
use Filament\Support\Colors\Color;
$plugin->navigationBadgeColor(Color::Cyan)
Navigation badge tooltip
You can add a badge tooltip to the navigation item using the ->navigationBadgeTooltip() method:
$plugin->navigationBadgeTooltip('Pro-customers only')
Disable navigation registration
You can disable the navigation item using the ->shouldRegisterNavigation() method:
$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:
use RalphJSmit\Filament\Explore\Filament\Schemas\Components\File\Version;
$plugin->defaultDisplayMode(Version::Row)
You can also set this per driver when using multiple drivers:
$driver->defaultFileVersion(Version::Row)