mellivora/flowblade
Composer 安装命令:
composer require mellivora/flowblade
包简介
A Laravel Blade component library based on Flowbite + Tailwind CSS, inspired by Chakra UI
README 文档
README
A modern Laravel Blade component library based on Flowbite + Tailwind CSS, with an intuitive Style Props API for elegant component styling.
🎯 Design Philosophy
Flowblade embraces a server-side component-driven architecture using Laravel Livewire and Alpine.js, offering significant development efficiency improvements over traditional API + Vue/React approaches:
Why Flowblade?
- Faster Development: Build interactive UIs without context-switching between backend and frontend frameworks. Write PHP and Blade templates, leverage Livewire for reactivity. 30-50% faster development compared to traditional API + Vue/React approaches.
- Reduced Complexity: No need to manage separate API endpoints, state management libraries, or complex build pipelines. Everything integrates seamlessly with Laravel.
- Better DX: Full-stack developers can work on features end-to-end without learning multiple frameworks. Blade components are familiar to Laravel developers.
- Smaller Bundle Size: Alpine.js (15KB) vs Vue/React (40KB+), resulting in faster page loads and better performance.
- Real-time Reactivity: Livewire provides real-time component updates without writing JavaScript, while Alpine.js handles lightweight interactivity.
- SEO-Friendly: Server-rendered HTML by default, perfect for content-heavy applications.
Development Advantages
- Reduced Tech Stack: Single language (PHP) instead of managing PHP + JavaScript/TypeScript. Eliminates context-switching and reduces cognitive load.
- Lower Learning Curve: Developers only need to know Laravel and Blade, not Vue/React/Angular. Onboarding time reduced by 40-60% for new team members.
- Simplified Deployment: Deploy as a single Laravel application. No separate frontend build process, no Node.js in production, no API versioning concerns.
- Faster Iteration: Changes to UI logic don't require rebuilding frontend assets. Hot reload works seamlessly with Laravel's development server.
Perfect For
- Admin Dashboards: Rapid development of internal tools with real-time updates and complex forms
- Small to Medium Web Applications: Content management systems, SaaS platforms, business applications
- Laravel Applications: Seamless integration with Laravel's ecosystem
- Full-Stack Teams: Developers comfortable with PHP and Blade templates
- Rapid Prototyping: Build features quickly without framework overhead
- Content-Heavy Sites: Server-side rendering with progressive enhancement
- Real-time Applications: Livewire's reactive components for live updates
✨ Features
- 🎨 138+ Components - Comprehensive UI component library
- 🚀 Style Props System - Intuitive props like
color="primary"andsize="lg"for flexible styling - 🎯 Tailwind CSS - Built on Tailwind's utility-first approach
- ⚡ Alpine.js Ready - Built-in Alpine.js integration
- 🔌 Livewire Compatible - Full support for
wire:model,wire:click, etc. - 🎭 Iconify Support - Access 100,000+ icons with
<x-icon name="heroicons:check" /> - 🎛️ Highly Configurable - Customize colors, sizes, and component prefixes
- 📦 Zero Config - Works immediately after
composer require
📋 Requirements
Before installing Flowblade, ensure your project meets these requirements:
System Requirements
- Laravel: 11.0 or higher
- PHP: 8.3 or higher
- Tailwind CSS: 4.0 or higher
- Node.js: 16.0 or higher (for asset compilation)
Dependencies
Flowblade requires the following packages (automatically installed):
- flowbite: ^3.0 - Design system and JavaScript components
- tailwindcss: ^4.0 - Utility-first CSS framework
- @tailwindcss/forms: ^0.5 - Form styling plugin
Optional Dependencies
For enhanced functionality, you may want to install:
- Alpine.js: ^3.0 - For lightweight interactivity (included in Flowbite)
- Livewire: ^3.0 - For reactive components (
composer require livewire/livewire) - Iconify: For icon support (included via CDN)
📦 Installation
Step 1: Install via Composer
composer require mellivora/flowblade
Step 2: Publish Configuration (Optional)
To customize component prefixes, colors, and sizes:
php artisan vendor:publish --tag=flowblade-config
This creates config/flowblade.php where you can configure:
- Component prefix (default:
x-) - Default colors and sizes
- Color and size mappings
See the Quick Start Guide for detailed configuration options.
Step 3: Configure Tailwind CSS
Add Flowblade views to your tailwind.config.js:
export default { content: [ "./resources/**/*.blade.php", "./vendor/mellivora/flowblade/resources/views/**/*.blade.php", ], }
Step 4: Compile Assets
npm run dev
📚 Documentation
For detailed setup instructions and configuration options, see:
- Quick Start Guide - Get started in 5 minutes
- Installation Guide - Step-by-step setup instructions
- Components Documentation - Complete component reference
- Style Props System - Intuitive styling with props
🎨 Style Props System
Flowblade includes a powerful Style Props system that allows you to style components using intuitive props instead of writing Tailwind classes directly:
Spacing Props
{{-- Padding --}} <x-box p="6">All sides</x-box> <x-box px="4" py="8">Horizontal and vertical</x-box> <x-box pt="2" pr="4" pb="6" pl="8">Individual sides</x-box> {{-- Margin --}} <x-box m="4">All sides</x-box> <x-box mx="auto">Horizontal centering</x-box> <x-box my="6">Vertical margin</x-box>
Sizing Props
{{-- Width and Height --}} <x-box w="full" h="64">Full width, 16rem height</x-box> <x-box w="1/2" h="auto">Half width, auto height</x-box> <x-box minW="xs" maxW="2xl">Min/max width constraints</x-box> <x-box minH="screen" maxH="96">Min/max height constraints</x-box>
Color Props
{{-- Background and Text Colors --}} <x-box bg="primary" color="white">Primary background</x-box> <x-box bg="blue.500" color="gray.700">Using color scales</x-box> <x-box borderColor="red.300">Border color</x-box>
Layout Props
{{-- Display and Position --}} <x-box display="flex" position="relative">Flex layout</x-box> <x-box display="grid" zIndex="10">Grid layout</x-box> <x-box overflow="hidden" overflowY="auto">Overflow control</x-box>
Flexbox Props
{{-- Flex Container --}} <x-box flex="1" flexDirection="column" alignItems="center" justifyContent="between" gap="4"> Flex layout with gap </x-box>
Typography Props
{{-- Text Styling --}} <x-box fontSize="lg" fontWeight="bold" textAlign="center" lineHeight="tight"> Styled text </x-box>
Border and Radius Props
{{-- Borders and Rounded Corners --}} <x-box border="2" borderColor="gray.300" rounded="lg">Bordered box</x-box> <x-box rounded="full">Fully rounded</x-box> <x-box borderRadius="xl">Large radius</x-box>
Shadow and Effects Props
{{-- Shadows and Effects --}} <x-box shadow="md" opacity="75">Box with shadow</x-box> <x-box shadow="lg" cursor="pointer" transition="all">Interactive box</x-box>
Available Color Scales
primary secondary success warning danger info gray blue red green yellow purple pink indigo cyan teal
Each color supports scales: 50, 100, 200, 300, 400, 500, 600, 700, 800, 900
Available Sizes
2xs xs sm md lg xl 2xl 3xl 4xl
Button Variants
solid outline ghost link subtle
💡 Advanced Examples
Form with Validation
<x-box p="8" shadow="lg" rounded="xl" maxW="md" mx="auto"> <x-vstack spacing="md"> <x-heading size="lg">Contact Form</x-heading> <div> <label class="block text-sm font-medium mb-2">Name</label> <x-input placeholder="Your name" /> </div> <div> <label class="block text-sm font-medium mb-2">Email</label> <x-input type="email" placeholder="your@email.com" /> </div> <div> <label class="block text-sm font-medium mb-2">Message</label> <x-textarea placeholder="Your message" rows="4" /> </div> <x-hstack spacing="md" justify="end"> <x-button variant="outline">Cancel</x-button> <x-button color="primary">Send</x-button> </x-hstack> </x-vstack> </x-box>
Dashboard Card Grid
<x-grid columns="4" gap="6"> @foreach($stats as $stat) <x-card shadow="md" rounded="lg"> <x-card-body> <x-vstack spacing="md"> <x-hstack justify="between" align="start"> <x-vstack spacing="xs"> <x-text color="gray.600" fontSize="sm">{{ $stat['label'] }}</x-text> <x-heading size="2xl">{{ $stat['value'] }}</x-heading> </x-vstack> <x-icon :name="$stat['icon']" size="32px" color="primary" /> </x-hstack> <x-text color="green.600" fontSize="sm">{{ $stat['change'] }}</x-text> </x-vstack> </x-card-body> </x-card> @endforeach </x-grid>
Navigation with Dropdown
<x-navbar bg="white" shadow="md"> <x-navbar-brand href="/"> <x-heading size="lg">MyApp</x-heading> </x-navbar-brand> <x-navbar-collapse> <x-navbar-link href="/features">Features</x-navbar-link> <x-navbar-link href="/pricing">Pricing</x-navbar-link> <x-navbar-link href="/docs">Documentation</x-navbar-link> </x-navbar-collapse> <x-hstack spacing="md"> <x-button variant="ghost">Sign In</x-button> <x-button color="primary">Get Started</x-button> </x-hstack> </x-navbar>
📝 Available Components
Flowblade includes 138+ production-ready components organized by category. All components feature:
- ✅ Style Props Support - Intuitive styling system with semantic props
- ✅ Complete Documentation - Detailed usage examples and API reference
- ✅ Accessibility Features - WCAG 2.1 compliant with keyboard navigation
- ✅ Responsive Design - Mobile-first approach with Tailwind CSS
- ✅ Flowbite Integration - Built on Flowbite design system
For a complete list of all components with detailed documentation, see Components Documentation.
🚀 Getting Help
Documentation
- Installation Guide - Step-by-step setup instructions
- Components Documentation - Complete component reference
- Development Plan - Project roadmap and progress
Resources
- Flowbite Documentation - Design system reference
- Tailwind CSS Documentation - Utility-first CSS framework
- Laravel Documentation - Laravel framework reference
- Iconify Icons - Browse available icons
🤝 Contributing
Contributions are welcome! Here's how you can help:
- Report Issues - Found a bug? Open an issue
- Suggest Features - Have an idea? Create a feature request
- Submit Pull Requests - Want to contribute code? Fork and submit a PR
- Improve Documentation - Help us improve docs and examples
Development Setup
# Clone the repository git clone https://github.com/zhouyl/flowblade.git cd flowblade # Install dependencies composer install npm install # Run tests composer test # Build documentation npm run build
📄 License
MIT License. See LICENSE for details.
🔗 Links
- GitHub: https://github.com/zhouyl/flowblade
- Packagist: https://packagist.org/packages/mellivora/flowblade
- Issues: https://github.com/zhouyl/flowblade/issues
- Discussions: https://github.com/zhouyl/flowblade/discussions
💝 Support
If you find Flowblade helpful, please consider:
- ⭐ Starring the repository
- 🐛 Reporting bugs and suggesting features
- 📝 Contributing to documentation
- 🤝 Sharing with the community
mellivora/flowblade 适用场景与选型建议
mellivora/flowblade 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 4 次下载、GitHub Stars 达 1, 最近一次更新时间为 2025 年 10 月 27 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「components」 「laravel」 「blade」 「tailwind」 「flowbite」 「ui-library」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 mellivora/flowblade 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 mellivora/flowblade 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 mellivora/flowblade 相关的其它包
同方向 / 同关键字的高下载量 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
统计信息
- 总下载量: 4
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 18
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-10-27