safi/laralcn-ui 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

safi/laralcn-ui

Composer 安装命令:

composer require safi/laralcn-ui

包简介

LaralCN-UI: a shadcn-style copy-and-own Blade component installer for Laravel.

README 文档

README

A shadcn/ui-style copy-and-own component system for Laravel & Blade.

LaralCN-UI is not a component library. You do not depend on a runtime package for the components. You pull individual components into your own project as plain .blade.php files that you fully own and can edit.

  • 25 components + blocks. Matched to current shadcn/ui (OKLCH theme, Tailwind v4 sizing/variants), including a full composable sidebar and the sidebar-01 block.
  • Pure Blade + Tailwind v4. Alpine.js only when interactivity is unavoidable. No React/Vue, no base UI primitive dependency.
  • Two channels. Install via Artisan CLI, or copy from the website.
  • Yours to edit. Components live in your source tree. No version coupling.
  • MIT licensed.

Channel A: CLI

composer require --dev safi/laralcn-ui   # once
php artisan ui:init                      # one-time project setup
php artisan ui:add button                # per component
<x-ui.button variant="destructive">Delete</x-ui.button>

Commands: ui:init, ui:add, ui:list, ui:diff. The CLI is Laravel-only.

Channel B: copy from the website

Every component has a docs page with a live preview and one-click copyable source. Copy the file into resources/views/components/ui/, copy the theme variables once, done. No CLI, no Composer. This is the supported path for plain-Blade and Statamic projects. Multi-file components (e.g. breadcrumb, sidebar) ship as a Blade namespace — the docs page lists every file with its target path.

Blocks

Blocks are ready-made, multi-component layouts you copy and own. The site's Blocks page (/blocks) shows each block with a live preview, the ui:add command for the components it composes, and its full source. The first block is sidebar-01 — a collapsible application shell (icon mode, mobile off-canvas, workspace switcher, nav-user) built from sidebar, breadcrumb, collapsible, dropdown-menu, avatar, separator, button, and skeleton.

php artisan ui:add sidebar breadcrumb collapsible dropdown-menu avatar separator button skeleton

Then paste the block's <x-ui.sidebar.provider> composition into your layout. (An installable ui:add sidebar-01 one-shot is planned — see component-plan.md.)

Requirements

  • Laravel app on Tailwind CSS v4 (the default laravel new setup: CSS-first @import "tailwindcss", @tailwindcss/vite, no tailwind.config.js).
  • gehrisandro/tailwind-merge-laravel in the consuming project (so class="px-8" correctly overrides a component's built-in px-4). ui:init detects this and prints the install command.
  • Alpine.js only for interactive components (Dialog, Dropdown, etc.).

Repository layout (monorepo)

Path What
packages/blade-ui the safi/laralcn-ui installer package + CLI
registry/ single source of truth: component JSON + sources
website/ Laravel docs/showcase app (dogfoods the components)
docs/ DECISIONS.md (locked calls), AUTHORING.md

Contributing

Read docs/AUTHORING.md (the component standard) and docs/DECISIONS.md (the locked architectural calls) before proposing components.

License

MIT © 2026 AbdulKader Safi

safi/laralcn-ui 适用场景与选型建议

safi/laralcn-ui 是一款 基于 Blade 开发的 Composer 扩展包,目前已累计 18 次下载、GitHub Stars 达 1, 最近一次更新时间为 2026 年 05 月 16 日, 在 PHP 生态内属于活跃度较高的组件。

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

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

围绕 safi/laralcn-ui 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-05-16