mellivora / flowblade
A Laravel Blade component library based on Flowbite + Tailwind CSS, inspired by Chakra UI
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/mellivora/flowblade
Requires
- php: ^8.3|^8.4
- illuminate/support: ^11|^12
- illuminate/view: ^11|^12
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3
- orchestra/testbench: ^8|^9
- phpunit/phpunit: ^10.5|^11.0
Suggests
- alpinejs: ^3.0 - For lightweight interactivity (included in Flowbite)
- livewire/livewire: ^3.6 - For reactive components and real-time updates
- simple-qrcode: ^4.0 - For QR code generation in QRCode component
This package is auto-updated.
Last update: 2025-11-01 04:41:17 UTC
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