From 883d02af22d59faae1482c50defbd096a5551a64 Mon Sep 17 00:00:00 2001 From: Dan Harrin Date: Mon, 22 Jul 2024 11:39:25 +0100 Subject: [PATCH] Update 06-navigation.md --- packages/panels/docs/06-navigation.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/panels/docs/06-navigation.md b/packages/panels/docs/06-navigation.md index cf8cb59a6e..a989a40de4 100644 --- a/packages/panels/docs/06-navigation.md +++ b/packages/panels/docs/06-navigation.md @@ -314,8 +314,10 @@ public function panel(Panel $panel): Panel } ``` -## Customizing width of the navigation -You can customize width of the navigation using the `sidebarWidth()` method. +## Customizing the width of the sidebar + +You can customize the width of the sidebar by passing it to the `sidebarWidth()` method in the [configuration](configuration): + ```php use Filament\Panel; @@ -323,10 +325,11 @@ public function panel(Panel $panel): Panel { return $panel // ... - ->sidebarWidth('auto'); + ->sidebarWidth('40rem'); } ``` -Additionally, if you are using the `sidebarCollapsibleOnDesktop()` method, you can customize width of the icons when collapsed using the `collapsedSidebarWidth()` method. + +Additionally, if you are using the `sidebarCollapsibleOnDesktop()` method, you can customize width of the collapsed icons by using the `collapsedSidebarWidth()` method in the [configuration](configuration): ```php use Filament\Panel; @@ -336,7 +339,7 @@ public function panel(Panel $panel): Panel return $panel // ... ->sidebarCollapsibleOnDesktop() - ->collapsedSidebarWidth('auto'); + ->collapsedSidebarWidth('9rem'); } ```