Download the PHP package shopper/sidebar without Composer
On this page you can find all versions of the php package shopper/sidebar. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package sidebar
Laravel Sidebar
A headless sidebar package for Laravel that allows you to create and manage sidebars with full customization support.
Originally forked from SpartnerNL/Laravel-Sidebar.
Installation
Require this package in your project:
Publish the config file:
Publish the views (optional, for customization):
Add the middleware to your route group or bootstrap/app.php:
Configuration
The config file (config/sidebar.php) allows you to customize:
Creating a Sidebar
1. Create a Sidebar Class
2. Register the Sidebar
Create an event listener or use the SidebarBuilder event:
Usage
The sidebar package provides two ways to render your sidebar:
Option 1: Livewire Component (Simple)
Use the built-in Livewire component for a ready-to-use sidebar with Alpine.js state management:
The Livewire component includes:
- Alpine.js store integration (
$store.sidebar) - Collapse/expand functionality
- Responsive behavior (mobile/desktop)
- LocalStorage persistence
Option 2: Blade Components (Full Customization)
For complete control over the sidebar layout, use the SidebarRenderer directly in your Blade views:
Both options use the same underlying SidebarRenderer, which renders:
item.blade.php- Individual menu itemsgroup.blade.php- Menu groupsbadge.blade.php- Item badgesappend.blade.php- Appended content
Alpine.js Store
The sidebar uses an Alpine.js store for state management. Initialize it in your JavaScript:
Store API
CSS Variables
The sidebar dimensions are available as CSS variables:
Inject them in your layout using the helper functions:
Helper Functions
The package provides namespaced helper functions:
Menu Item Options
License
This package is licensed under MIT. You are free to use it in personal and commercial projects.
All versions of sidebar with dependencies
illuminate/cache Version ^12.68|^13.27
illuminate/container Version ^12.68|^13.27
illuminate/contracts Version ^12.68|^13.27
illuminate/http Version ^12.68|^13.27
illuminate/routing Version ^12.68|^13.27
illuminate/support Version ^12.68|^13.27
illuminate/view Version ^12.68|^13.27
livewire/livewire Version ^4.1
mckenziearts/blade-untitledui-icons Version ^1.5
spatie/laravel-package-tools Version ^1.9