承接 filafly/filament-logo-tools 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

filafly/filament-logo-tools

Composer 安装命令:

composer require filafly/filament-logo-tools

包简介

Enhanced logo controls for Filament panel sidebars — icon logos, collapse button positioning, and inverted logo sections.

README 文档

README

Latest Version on Packagist Total Downloads

A Filament plugin that adds enhanced logo and sidebar controls to your panel. All features are implemented through Filament's native plugin system, render hooks, and CSS — no view overrides required.

Requirements

  • PHP 8.2+
  • Filament v4 or v5

Installation

You can install the package via Composer:

composer require filafly/filament-logo-tools

Publish the assets:

php artisan filament:assets

Register the plugin in your panel provider:

use Filafly\LogoTools\LogoToolsPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugin(LogoToolsPlugin::make());
}

Icon Logo

Display a compact icon when the sidebar is collapsed, replacing the full brand logo. Only renders when the panel has sidebarCollapsibleOnDesktop() enabled.

LogoToolsPlugin::make()
    ->iconLogo('img/icon.svg')
    ->darkModeIconLogo('img/icon-dark.svg')
    ->iconLogoHeight('1.5rem')

iconLogo(string | Htmlable | Closure | null $logo)

The icon shown when the sidebar is collapsed. Accepts a file path (rendered as <img>), an Htmlable instance (rendered inline), or a Closure.

// Image path
->iconLogo('img/icon.svg')

// Inline SVG
->iconLogo(fn () => new HtmlString('<svg ...>...</svg>'))

darkModeIconLogo(string | Htmlable | Closure | null $logo)

A separate icon for dark mode. When set, the light and dark variants swap automatically. If not set, the single iconLogo is used in both modes.

iconLogoHeight(string | Closure | null $height)

The CSS height of the icon logo. Defaults to 1.5rem.

->iconLogoHeight('2rem')

Logo Section

Control the appearance of the logo section area in the topbar and sidebar header.

logoSectionBackground(array | string | bool $color = true)

Adds an inverted background to the logo section — dark background in light mode, light background in dark mode. The full brand logo's light/dark variants are swapped automatically to match.

// Default dark/light inversion
->logoSectionBackground()

// Filament color (array)
->logoSectionBackground(Color::Blue)

// Filament color name
->logoSectionBackground('primary')

// Hex code
->logoSectionBackground('#1e3a5f')

// CSS color function
->logoSectionBackground('oklch(0.5 0.2 240)')

// Tailwind class
->logoSectionBackground('bg-gray-900')

logoSectionBorder(string | Closure | null $color = 'rgb(0 0 0 / 0.1)')

Adds a vertical border on the trailing edge of the logo section. Works with or without logoSectionBackground().

// Default subtle black border
->logoSectionBorder()

// Custom color (e.g. for use with logoSectionBackground)
->logoSectionBorder('rgb(255 255 255 / 0.1)')

logoSectionPadding(string | Closure | null $padding)

Adds inline-start padding to the logo section.

->logoSectionPadding('1rem')

collapsedLogoSectionWidth(string | Closure | null $width)

Overrides the collapsed width of the logo section in the topbar. Filament's --collapsed-sidebar-width CSS variable (4.5rem) is not always visually accurate, so this lets you fine-tune alignment.

->collapsedLogoSectionWidth('5.5rem')

Collapse Button

Customize the sidebar collapse/expand button appearance and behavior.

collapseButtonPosition(CollapseButtonPosition $position)

Controls whether the collapse button appears to the left or right of the logo. Automatically set to Right when an icon logo is configured.

When positioned right, the button is rendered as a small edge button sitting on the border of the logo section — similar to apps like Linear and Notion.

use Filafly\LogoTools\Enums\CollapseButtonPosition;

->collapseButtonPosition(CollapseButtonPosition::Right)

collapseButtonStyle(CollapseButtonStyle | string $style)

Sets the shape of the collapse button when positioned on the logo section edge. Accepts the enum or a string ('circle', 'rounded', 'square').

use Filafly\LogoTools\Enums\CollapseButtonStyle;

->collapseButtonStyle(CollapseButtonStyle::Circle)   // full circle (default)
->collapseButtonStyle(CollapseButtonStyle::Rounded)  // slightly rounded corners
->collapseButtonStyle('square')                      // sharp corners

expandButtonIcon(string | BackedEnum | null $icon)

Overrides the icon shown on the expand button (when sidebar is collapsed).

use Filament\Support\Icons\Heroicon;

// Enum
->expandButtonIcon(Heroicon::OutlinedChevronRight)

// String
->expandButtonIcon('heroicon-o-arrow-right')

collapseButtonIcon(string | BackedEnum | null $icon)

Overrides the icon shown on the collapse button (when sidebar is expanded).

->collapseButtonIcon(Heroicon::OutlinedChevronLeft)

Full Example

use Filafly\LogoTools\LogoToolsPlugin;
use Filafly\LogoTools\Enums\CollapseButtonStyle;
use Filament\Support\Colors\Color;

->plugin(
    LogoToolsPlugin::make()
        ->iconLogo('img/icon.svg')
        ->darkModeIconLogo('img/icon-dark.svg')
        ->iconLogoHeight('1.25rem')
        ->logoSectionBackground(Color::Blue)
        ->logoSectionBorder('rgb(255 255 255 / 0.1)')
        ->logoSectionPadding('0.5rem')
        ->collapsedLogoSectionWidth('5.5rem')
        ->collapseButtonStyle('rounded')
        ->expandButtonIcon('heroicon-o-arrow-right')
        ->collapseButtonIcon('heroicon-o-arrow-left')
)

Credits

License

The MIT License (MIT). Please see License File for more information.

filafly/filament-logo-tools 适用场景与选型建议

filafly/filament-logo-tools 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2 次下载、GitHub Stars 达 1, 最近一次更新时间为 2026 年 02 月 19 日, 在 PHP 生态内属于活跃度较高的组件。

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

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

围绕 filafly/filament-logo-tools 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

  • 总下载量: 2
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 38
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-02-19