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
sidebarand thesidebar-01block. - 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 newsetup: CSS-first@import "tailwindcss",@tailwindcss/vite, notailwind.config.js). gehrisandro/tailwind-merge-laravelin the consuming project (soclass="px-8"correctly overrides a component's built-inpx-4).ui:initdetects 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 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 safi/laralcn-ui 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Web Font Loader gives you added control when using linked fonts via @font-face.
Ariadne Component Library: xml writer and parser Component
Ariadne Component Library: Cache Component
Ariadne Component Library: hierarchical configuration management Component
Ariadne Component Library: user and group rights management Component
Ariadne Component Library: W3C style events Component
统计信息
- 总下载量: 18
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 35
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-05-16