定制 wezlo/filament-workspace-tabs 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

wezlo/filament-workspace-tabs

Composer 安装命令:

composer require wezlo/filament-workspace-tabs

包简介

Browser-like workspace tabs for Filament panels

README 文档

README

Browser-like tabs for Filament panels. Open multiple pages in tabs without losing context, drag to reorder, pin frequently accessed pages, and right-click for quick actions.

Features

  • Tab per page — Every navigation opens a new tab. Revisiting a URL activates the existing tab.
  • Drag to reorder — Rearrange tabs via drag-and-drop (powered by SortableJS).
  • Pin tabs — Double-click a tab to pin/unpin it. Pinned tabs can't be closed and stick to the left.
  • Context menu — Right-click any tab for: Close, Close Others, Close to the Right, Duplicate, Pin/Unpin, Close All.
  • Recently closed — Reopen closed tabs from the dropdown (last 50 stored).
  • Keyboard shortcutsCtrl+W / Cmd+W to close the active tab.
  • Middle-click — Middle-click or Ctrl+click sidebar links to open in a new tab.
  • Persistent — Tabs survive page reloads via localStorage.
  • Dark mode — Full support for Filament's dark mode.
  • SPA-ready — Works with Filament's ->spa() mode and Livewire's wire:navigate.

Requirements

  • PHP 8.2+
  • Filament v4 or v5
  • Laravel 11+

Installation

composer require wezlo/filament-workspace-tabs

Setup

1. Register the plugin

Add the plugin to your panel provider:

use Wezlo\FilamentWorkspaceTabs\WorkspaceTabsPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugins([
            WorkspaceTabsPlugin::make(),
        ]);
}

2. Add the Tailwind source

Add the package views to your Filament theme CSS so Tailwind can scan utility classes:

/* resources/css/filament/{panel}/theme.css */
@source '../../../../vendor/wezlo/filament-workspace-tabs/resources/views/**/*';

Then rebuild your frontend assets:

npm run build

Configuration

All options are available as fluent methods on the plugin:

WorkspaceTabsPlugin::make()
    ->maxTabs(25)                          // Maximum open tabs (default: 20)
    ->persistKey('my_tabs')                // localStorage key prefix (default: 'filament_workspace_tabs')
    ->excludeUrls(['/admin/login'])        // URL prefixes to never track as tabs
    ->contextMenu(false)                   // Disable right-click context menu
    ->dragReorder(false)                   // Disable drag-to-reorder

Usage

Once installed, the tab bar appears below the topbar automatically.

Action Behavior
Click sidebar link Opens a new tab
Click an existing tab Switches to that tab (navigates to its URL)
Middle-click / Ctrl+click a link Opens in a new tab without navigating
Close button (x) Closes the tab
Double-click a tab Pins / unpins the tab
Right-click a tab Opens context menu
Ctrl+W / Cmd+W Closes the active tab
Drag a tab Reorders it

Pinned tabs

Pinned tabs display a pin icon alongside the label, have an indigo left border, and cannot be closed until unpinned. They always stay to the left of unpinned tabs.

Context menu options

  • Close — Close this tab (not available for pinned tabs)
  • Close Others — Close all tabs except this one (respects pinned tabs)
  • Close to the Right — Close all tabs to the right of this one
  • Duplicate — Open the same URL in a new tab
  • Pin / Unpin — Toggle the pinned state
  • Close All — Close all unpinned tabs

Recently closed

When tabs are closed, they're stored in a history list. Click the dropdown arrow on the right side of the tab bar to reopen any of the last 10 recently closed tabs.

How it works

  • Tab state (URLs, labels, order, pinned status) is stored client-side in localStorage using Alpine.js $persist().
  • Switching tabs triggers Livewire.navigate() for SPA-style page transitions.
  • Page titles are automatically extracted from document.title on each navigation.
  • The tab bar is injected via Filament's TOPBAR_AFTER render hook — no template modifications needed.
  • The persist key is automatically scoped to the panel ID to avoid cross-panel tab bleed.

Publishing config

php artisan vendor:publish --tag="filament-workspace-tabs-config"

License

MIT

wezlo/filament-workspace-tabs 适用场景与选型建议

wezlo/filament-workspace-tabs 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 1.03k 次下载、GitHub Stars 达 8, 最近一次更新时间为 2026 年 04 月 09 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「laravel」 「tabs」 「workspace」 「filament」 「browser-tabs」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 wezlo/filament-workspace-tabs 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 wezlo/filament-workspace-tabs 我们能提供哪些服务?
定制开发 / 二次开发

基于 wezlo/filament-workspace-tabs 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 1.03k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 8
  • 点击次数: 7
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 8
  • Watchers: 0
  • Forks: 1
  • 开发语言: JavaScript

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-04-09